USB HS after the first BULK transfer is complete, does not receive next
Hello.
I am using STM32H7, with USBD CDC HAL Driver.
I created a firmware that works as follows:
The first one I got from the PC, via USB, JPEG , then I decode it to YUV, then using DMA2D to RGB and then display it using LTDC. Everything works great for one frame.
The problem is next frame . I can't get it anymore.From what I can see in wireshark, for the first URB BULK request I get URB BULK response with code 0 (success), but for the next one it is already code 71 (EPORTO).
In my receive callback, after each packet received, it increments the address for the new packet, and at the end of the transfer it swap the buffers. Every time I call USBD_CDC_ReceivePacket.
When I disconnect all non-USB functionality, the problem does not occur.
Additionally, I noticed that in case of a problem, I get USB reset and USB suspend interrupts after receiving the first packet (in the second case, when everything is fine, I don't get any additional interrupts)
I've been debugging the problem all day and can't figure out what's causing it
