Using FreeRTOS with STM32 usbd_core.c as USB device

I’ve been working on a STM32(f7) project that uses USB host and device drivers from the STM32 libraries. usbhcore.c and usbdcore.c , I have been able to get the host working under OS pretty well but I now hat to get the usb driver working under RTOS. ST made the host code confrom to FreeRTOS and it is essentially switchable. I havea USB device working now, but it is running in the IDLE thread, which I am asusming isn’t good? So before I move on, I would like to get all that under control. I with ST had done the same things with the usb device as they didi with the host but there aren’t even examples of a USB device with RTOS, that I can find , anyway. My project is a MIDI project so I have usbdMIDI.c and usbdMIDIif.c performing the midi IO to and from the app. I am a bit lost as to how to get usbdcore to run in its own thread that I can have some control over. I guess I am not really sure what to ask for here as I am still trying to grok how the usb device code works. I believe it is all interrupt driven.. I didn’t write it so I am at somewhat of a loss at this point. So , any hints or links or examples would be very helpful. Thank you for reading and thank you for FreeRTOS.

Using FreeRTOS with STM32 usbd_core.c as USB device

Sorry nothing specific, but would say it is ok to run in the Idle task provided that the code never blocks the task – by which I mean never does something like call vTaskDelay(), or wait for a semaphore with a block time, etc.

Using FreeRTOS with STM32 usbd_core.c as USB device

Thank you Richard. Every little bit helps! —– Original Message —– From: “[freertos:discussion]” 382005@discussion.freertos.p.re.sourceforge.net To:”[freertos:discussion]” 382005@discussion.freertos.p.re.sourceforge.net Cc: Sent:Thu, 04 Apr 2019 01:27:15 -0000 Subject:[freertos:discussion] Re: Using FreeRTOS with STM32 usbd_core.c as USB device
Sorry nothing specific, but would say it is ok to run in the Idle
task PROVIDED THAT the code never blocks the task – by which I mean never does something like call vTaskDelay(), or wait for a semaphore

with a block time, etc.

Using FreeRTOS with STM32 usbd_core.c as USB device [1]

Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/freertos/discussion/382005/ [2]
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/ [3]

Links:

[1] https://sourceforge.net/p/freertos/discussion/382005/thread/2eb034536c/?limit=25#39cf/f1d4 [2] https://sourceforge.net/p/freertos/discussion/382005/ [3] https://sourceforge.net/auth/subscriptions/