MIDI host interrupt issues #3473
Replies: 2 comments
-
|
Interestingly, the MIDI host is not listed under the project README.md. Is the MIDI host stack ready to be used, or are there still some works needed to be done? @hathach |
Beta Was this translation helpful? Give feedback.
-
Nice catch ! I think we need a review of README.md.
Currently there is no NAK retry limit in HCD DWC2, which leads to high CPU load. For OTG_HS enabling DMA can make the situation a lot better, for OTG_FS there is no chance but adding max_nak handling like in fsdev: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to interface a MIDI keyboard to an stm32f411-discovery board. I tried integrating the MIDI host example into my project only to find that it was making other tasks in my main program sluggish (e.g. drawing to a display).
I found that the USB_OTG_FS_IRQHandler() is occupying a majority of the CPU time (by toggling a GPIO and viewing the output on a logic analyzer). I tried running the midi_rx example on my board to rule out any issues with my program, but got the same results:
`void OTG_FS_IRQHandler(void) {
GPIOD->BSRR = GPIO_PIN_13; // set GPIO high
tusb_int_handler(0, true);
GPIOD->BSRR = GPIO_PIN_13 << 16; // set GPIO low
}`
Is this expected behavior? I suppose I could work around the issue by setting the IRQ to a low priority so that it doesn't dominate other interrupt-driven tasks, but it seems like the IRQHandler shouldn't be eating up this much of our CPU time.
Beta Was this translation helpful? Give feedback.
All reactions