AnsweredAssumed Answered

USB cannot recieve GET_DESCRIPTOR

Question asked by robison.don.001 on Sep 28, 2014
Latest reply on Oct 8, 2014 by Montassar BEN ROMDHANE
I've been trying to get my st discovery board to receive data from my computer over the USB.  My source is attached.  I've been working on this for a long time.  The progress is slow.  I spent weeks just to figure out that OTG_FS_GCCFG needs to have PWRDWN bit set.  The reference manual is little help.  It actually doesn't talk about PWRDWN anywhere except to say that it exists. 

Both the computer and the board acknowledge they are attached now.  The board sees the reset command from the computer.  I can see from Microsoft Message Analyzer that the computer tries to send over a GET_DESCRIPTOR into endpoint 0, but It never registers on the board.  I never get the expected RXFLVL, or OEPINT interrupt.  The OTG_FS_DOEPTSIZ0 should also decrement and indicate that a setup packet has been received, but that never happens.  In fact, I get the USBreset interrupt, then the enumeration done interrupt, then everything just goes into suspend state after a few seconds.  I suspect the EPENA bit should self clear at some point in OTG_FS_DOEPTSIZ0 but that never happens.

I suspect the RxFIFO has problems.  The OTG_FS_GRXSTSR and OTG_FS_GRXSTSP and the actual FIFO itself all have the same non-sense value.  The value isn't always the same.  Right now its 0xFBF3DFFF.  The manual says everything should be 0x0 before anything significant happens.  In my code I've tried to flush the RxFIFOs but nothing much changes.

I've followed the procedures given in the reference manual, but I cant get any indication that the GET_DESCRIPTOR packet has arrived.  Can you explain where I went wrong?  Is there a better reference regarding how the OTG_FS is supposed to behave and be setup?

the source and binary are attached

Attachments

Outcomes