2014-01-05 12:15 PM
Hi,
I'm reaching Control Pipe IN Timeout indication in DIEPINT0.TOC :Bit 3 TOC: Timeout condition
Applies only to Control IN endpoints. Indicates that the core has detected a timeout condition on the USB for the last IN token on this endpoint.What exactly this timeout is? Does it mean that TxFIFO is empty while IN token received from Host? If yes how long this timeout is?
I'm tying to send more then 64 bytes IN data - let's say 100bytes. To do it I write 100 bytes to TxFIFO, and fill DIEPTSIZ.XFRSIZ = 100 DIEPTSIZ.PKTCNT = 2 But it turns out that core does not send two packets (64 and 36 bytes) but stops after first 64 bytes IN transfer. Why? How in this caseDIEPTSIZ XFRSIZ and PKTCNT
should be used? I looked at the USB sample code from ST and they are using only PKTCNT=1 and XFRSIZ<=64. They also fill TxFIFO with no more then 64 bytes. If this is the right way to make IN transfer what are all this nice control registers for? And why it is not clearly written in reference manual?2014-01-05 12:18 PM
I forgot to mention that I'm working with STM32F207.
2014-01-12 09:44 PM
Hi,
I'm still waiting for explanation about DIEPINT0.TOCDIEPTSIZ.XFRSIZ
DIEPTSIZ.PKTCNT2014-01-13 03:38 AM
Hi
''Hi, I'm still waiting for explanation about DIEPINT0.TOCDIEPTSIZ.XFRSIZ
DIEPTSIZ.PKTCNT'' Do not know. ''I'm tying to send more then 64 bytes IN data - let's say 100bytes. To do it I write 100 bytes to TxFIFO
'' I have found that with USB CDC (serial device) device and PC Host VirtualComPort, the VCP would not reliably send more than 64bytes at a time. We had to insert a <CR> to force the VCP driver to send multiple packets. In the end we gave up trying to send more than 64btes/packet (we do not use <CR> in our protocol) we just made sure our host program sent in 64byte packets. That does not answer you question though.2014-01-14 10:07 AM
More likely ST has a bug in implementation of this flow. From what I could get experimenting with it
DIEPTSIZ.PKTCNT
can not be nothing else but ''1''. It means no more that one packed can be stored in FIFO.BUT!!!
I want te get clear explanation from ST representative here in forum regarding mentioned registers and USB device IN transfer functionality. If it is not working as described in reference manual (and it is not working) tell us how it does work?
2014-01-15 05:52 AM
So, yours is a USB OTG driver problem, I'm curious, because eventually I will have to implement complex USB transfers and all in my project, but I don't know anything about this topic. The only help I can offer is go look for errata and silicon limitations, two of my problems were due to ST production bugs indicated in the ''Errata and Silicon limitations for ST32F-so-and-so'' documents. Most often there are software workarounds for that.