AnsweredAssumed Answered

Is the USB library threadsafe?

Question asked by Guido Körber on Feb 16, 2018

I am developing on the STM32F0 using the USB library and encounter problems when my main routine starts to send data early after the device received the SetConfiguration request.

So far I could narrow it down to the USB stack failing to properly transmit descriptors when I send a data packet directly after getting configured. Data sending is handled from the main loop, so no exception is active at that time.

Could it be that there is a problem if a USB event comes in while the library is loading my endpoint for data transmission?

And would the USB stack work if I disable interrupts before calling it?

Outcomes