cancel
Showing results for 
Search instead for 
Did you mean: 

USB FS not sending correct amount of data

Jaxc
Associate

Hello

I have been trying to debug an USB issue I've had on my STM32F722 Nucleo. For whatever input I try to send with CDC only two bytes are sent to my host PC. I'm using the latest HAL drivers.

When breaking in the function USB_WritePacket() I can see that the contents of DIEPTSIZ3 are as exptected (MCNT = 0, PTKCNT = 1, XFRSIZ = 26) and the contents of pSrc are correct. When I step through the loop I can see that DTXFSTS3 is decreasing by one for each write to the FIFO. Once all 7 32 bit words are written I can see activity on my host PC.

So far everything works as expected.

But when I check on my PC with Wireshark (And COM teminal) I only receive two bytes. The value of these bytes seems random, but stays the same until I recompile.

Thanks in advance for any help solving this

/Jacob

1 REPLY 1
timistof
Associate III

Hi Jacob,

I'm experiencing the same issues. I'm writing a asynchronous usb audio 2.0 driver for STM32F429 with external HS USB PHY and trying use a Iso IN endpoint to send back actual sample clock feedback. My endpoint should receve a in-transfer only once every 8 frames. In the datasheet I see MCNT defined as "For periodic IN endpoints, this field indicates the number of packets that must be transmitted per frame on the USB." I'm thinking perhaps the IN endpoint only works when sending packets every frame. What is your endpoint's frame interval?

Cheers,

Tim