AnsweredAssumed Answered

stm32f401 full speed usb crashes on odd number of packets in bulk mode

Question asked by szafranek.michael on Oct 9, 2015

i am trying to transmit data to stm32 from an android phone.

i setup a receive and send buffer for usb each with 256 bytes.

if i send one bulk packet with less or equal to 64bytes and echo in back things work fine.

But if i setup a buffer of 256 bytes and try to transmist 2 packets, on with 64 bytes and one with 1 byte or more, the first is transmitted correct but the second creates a  GRXSTS_PKTSTS_DATA_TOGGLE_ERR event and makes the usb stack unusable for more data transmission.

i am using stdperipheral library, freertos and st's usb library in version 2.1.0.

Any suggestion what's going on there and how to fix this?