cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 - USB and FreeRTOS?

dmarks-ls
Associate III

I'm starting a project on the STM32U5G9, and one feature we want is USB connectivity, just a simple virtual COM port (CDC class).  Looking at the Middleware picker in CubeMX, the only USB-related items are USBPD (don't need Power Delivery at the moment), and USBX, which is the ThreadX/Azure RTOS USB stack.  If I look for CubeMX examples for the STM32U5G9J-DK2, the only USB examples offered are for ThreadX and USBX.

Is it reasonable to assume that if I don't want to be writing my USB application from scratch on the STM32U5, I should be using ThreadX/Azure RTOS instead of FreeRTOS?

Dana M.

12 REPLIES 12

Let me first say I agree with @dmarks-ls and her opinion.

While my experience with FreeRTOS (old code) were not positive, with ThreadX and ..X family we were able to get stable and reliable designs with very little extra effort and overhead, last but not least with an easy learning phase.

We pack many interfaces all time critical in our IOT solutions, Network interface(Ethernet) for management and reporting(SCADA), removable mass storage (USB pen drive, USBX) with legacy file system and Remote access (FTP) for logging events and operations, Modbus RTU on UARTs for levels, Ph meters and other IOT, multiple I2C bus with several devices, a great bunch of GPIO with interrupt, all within a SNTP-driven RTC clock providing scheduling and timestamps on H7 devices with WEB file system in internal flash - all stable, deterministic, and IWDG set for emergency that was triggered only once in one product installed where severe thunderstorm are usual.

And that is why I do ecourage everybody to approach this OS.

Obviosly there is space for further improvement and I hope that ST will drive ThreadX (where they have big leverage) to go further: add new feature, make code more performant, fix minor bugs (yes, nobody is perfect), and look carefully at developers feedback!

Mike B.

 If you have any questions about ThreadX or FreeRTOS, feel free to reply to this.

When you override malloc() and free() to use a ThreadX pool, how do you provide locking among multiple threads?

 

ThreadX byte pools are inherently thread-safe; no external mutex or locking is required.

Dana M.