Documentation Update Request: STM32F4 WFI Instruction + HS core == Failing TinyUSB #2295
brandonbraun653
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I didn't see a great option for submitting a ticket related to documentation updates, so I'll just post this here. Maybe it'll make it's way into the integration guide @hathach? If there is a supported way for me to add a pull request for documentation, I'd be happy to make one.
I recently integrated TinyUSB on a custom board using the STM32F446RE MCU + FreeRTOS. My application took advantage of USB FS on the HS core, but I ran into a few problems in regards to the enumeration process, mostly flaky response times to interrupts, that completely derailed the software. I spent several weeks off and on trying to figure out what was going on (lemon HW, PCB issue, software bug, etc) and ultimately it ended up being a single assembly instruction in my project side idle task. I learned from the libusb_stm32 demo software that usage of the wait-for-interrupt (WFI) instruction combined with the USB HS core results in the CPU not waking up for USB events. After disabling this in my project side software, the TinyUSB stack worked immediately and reliably.
Is it possible to add a community driven integration notes section to the documentation? I'm not the first one to have encountered this problem and it almost made me give up on TinyUSB as a whole out of sheer frustration. I'd love to add some notes about this particular failure mode so others can benefit.
Beta Was this translation helpful? Give feedback.
All reactions