This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x USB Reset and starterware usb.c

I am looking at the USB example code in Starterware_02_00_00_07

I see what looks like a descrepency between the starterware reset code and the Technical Reference Manual SPRUH73F.pdf

In the TRM for USB0CTRL register (section 16.5.2.2)

  • SOFT_RESET is bit 0 (USB0CTRL[0])
  • SOFT_RESET_ISOLATION is bit 5 (USB0CTRL[5])

In the description of the SOFT_RESET bit (USB0CTRL[0]) it states

  • Both the soft_reset and soft_reset_isolation bits should be asserted simultaneously.
  • Both the soft_reset and soft_reset_isolation bits will be automatically cleared.

However,

in the code AM335X_StarterWare_02_00_00_07/drivers/usb.c the function USBReset( )

the code is only setting USB0CTRL[0] -- soft_reset,

    reg = HWREG(ulBase + USB_0_CTRL);
    reg |= 1;   

This code seems to disagree with the TRM.

Even more confusing, the description for the SFOT_RESET bit warns against setting the SOFT_RESET_ISOLATION bit by itself

Setting only the soft_reset_isolation bit will cause all USB0 output
signals to go to a known constant value via multiplexers.
This will prevent future access to USB0.
To clear this condition the USBSS must be reset via a hard or soft
reset.
However the description for the SOFT_RESET_ISOLATION bits states
This bit should be set high prior to setting bit 0 and cleared after bit 0
is cleared.
 
Can you please comment on the recommended approach for reseting the USB0 block in the AM335x