cancel
Showing results for 
Search instead for 
Did you mean: 

extra OUT packet sent before IN packet on H2D control transfers - STM32G0

Strongato
Associate III

Hello everyone,

I'm using the stm32G0 USB Host with firmware package V1.6.3.

There is an issue with H2D control transfers, where the USB Host stack send a second OUT packet before sending an IN packet on the last packet.

I wrote a usb dfu host class that uses USBH_CtlReq.

packet_analysis.png


From this picture on the left we can see the PC sending a DNLOAD packet to the stm32h7, first the OUT packet followed by an IN packet.

On the right we can see the stm32G0 host sending an OUT packet followed by another OUT packet, before sending an IN packet. The device here is the stm32f4, which for some odd reason allows this (every single stm I tried allows this except h7, tested stm: F4, F7, G0, H5, L5). So my update actually works on every single stm except on the stm32h7.

But in the middle picture, the host is still stm32G0, but the device is an stm32h7, which after receiving the second OUT packets NAK's it.

From the picture, I would say that the stm32h7 is in the right here. It see that it got an OUT packet, which size was less than 64 bytes, and it expects an IN packet. That's exactly what the PC does, but not the stm32G0.

For some reason the stm32G0 sends another OUT packet before sending the IN packet, which is wrong.

I am providing a zip file with the .usb files, if anybody wants to take a look at this for themselves.

Kind regards,
Strongato

0 REPLIES 0