Content originally posted in LPCWare by BrunoF on Thu Jul 03 11:11:30 MST 2014
Hi Tsuneo,
i've read you in several forums and i know you're a Guru in the USB subject.
Maybe you can give me a hint with something because i'm out of ideas. I'm working with a LPC1343 Bulk USB project. I'm using endpoint 0x81 for IN transfers and 0x02 for OUT transfers (i would love to use endpoint 0x03 because of FIQ and double buffering, but im limited to 0x02 cause of Host Driver side).
Problem is that Host may send data fast (up to 1mBps). So, i must receive the data as faster as i can. I started modifying the CDC example for my purpose. Everything works fine. Host side sends around 520 byte each 30mS in my tests. It works just fine for sometimes a few seconds, sometimes something more (a minute or so). Nothing is dropped. Thing is that at a certain point, OUT transactions start to get Cancelled forever.
My main code doesn't make anything more than sending 2 bytes (IN) each 16mS intervals. I removed all code so i can just read the Endpoint 0x02 as fast as i can. Still, you can see in the Report i've attached to this post that starting from Seq 2112 Endpoint 0x02 seems to stop responding and i have no clue why or how to recover it from that state.
I would love to fix this problem, so ideally it coud not drop even one packet, but, if this happen a couple of times per minute, i can live with that too. But at least i need to know a way to:
1) knowing if there's a error with OUT transfers (when endpoint stop responding, the associated interrupt stop occurring too), so i don't know how to detect the error, specially if no interrupt occur to indicate the error;
2) recover from that permanent CANCELLED state somehow, so i can continue receiving future transfers.
Thanks in advance!