Skip to main content
Visitor II
June 2, 2008
Question

In USB New FWLib ST Micro needs a new Function USB_DeInit()

  • June 2, 2008
  • 1 reply
  • 470 views
Posted on June 02, 2008 at 16:49

In USB New FWLib ST Micro needs a new Function USB_DeInit()

    This topic has been closed for replies.

    1 reply

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:53

    I was having a LOT of problems with an Unstable USB when coming out of a HW Reset, not a Power Up Reset

    This solved a lot of problems

    Don't forget to be in disabled IRQs

    This and other like it needs to be RIGHT after main or be done in Assembly and placed in 91x_init.s

    There looks like a LOT needs to be in 91x_init.s

    See Timer 0 - 3 problems that are now solved by doing a TIM_DeInit(), this needs to be in 91x_init.s

    // ************************************************

    // A system reset does not reset the USB registers.

    // ************************************************

    void USB_DeInit(void)

    {

    _SetCNTR(0x0003);

    _SetISTR(0x0000);

    _SetDADDR(0x0000);

    _SetBTABLE(0x0000);

    }

    :(