AnsweredAssumed Answered

STM32F411 USB FS OTG Problem (losing data)

Question asked by mjbcswitzerland on Oct 17, 2015
Hi All

Does anyone know of differences in FS USB OTG behavior for the STM32F411 compared to other STM32F4xx parts?

I have a USB-MSD function which receives data from a PC host and saves to internal Flash. The PC host sends the data in 64 byte packets (endpoint size) and these are collected into a 512 byte buffer (sector). Each time the buffer is full it is committed to Flash. This takes about 2.5ms in which time the host receives Naks from the device since it can't accept more data at the moment.

On the STM32F407 this operates reliably (even if the routine performing the Flash data save is artificially slowed to take more than 50ms).
On the STM32F411 there is very often a 64 byte packet loss which occurs when the flash is programmed (that is, the USB device loses it so the application collecting the 512 byte buffer and saving it has corrupted data).

The code running on both is identical.

Any ideas where to look?

Regards

Mark

Outcomes