cancel
Showing results for 
Search instead for 
Did you mean: 

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

rgreenthal
Associate II
Posted on June 02, 2008 at 16:49

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

1 REPLY 1
rgreenthal
Associate II
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);

}

:(