cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way for scheduling tasks on STM32L031?

noobmaster69
Associate III

Is there any task schedular for STM32? I want a bare metal task schedular for scheduling tasks so I wanted to know if there is any existing task schedular in libraries like nordic has in its SDK. If not any recommendations?

The main reason I want schedular is because I have multiple applications running on STM32L031K6 for eg: UART, EEPROM operations, IO control etc. And I want to schedule those tasks as the are occured.

7 REPLIES 7
gbm
Lead III

FreeRTOS, also available in CubeIDE.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

There is no other option? Like basic schedular (queue) in HAL libraries?

Piranha
Chief II

No, HAL is only a driver library and a broken, bloated and practically useless anyway. ST has a scheduler in a STM32CubeWB/WL packages, which they call a "sequencer" and a "timer". Both are described in AN5289 section 4.

Also check out these and some others:

https://github.com/cocoOS/cocoOS

https://github.com/arkhipenko/TaskScheduler

By the way, I looked at those:

https://devzone.nordicsemi.com/f/nordic-q-a/63209/nrf-sdk-scheduler-vs-task-manager

Do they really not provide a software timers at all?

Personally I didn't found any that meets my requirements and wrote my own. Of course, a better one... :smiling_face_with_smiling_eyes:

Hii, thanks for your reply. I saw sequencer you shared and it wouldnt work for me as it takes functions which have zero arguements as in (void)(* task)(void) but for my applications I need to pass two arguements event_data and event_size where event_data is an array and event_size is size of the array. (void)(* task)(void*, uint16_t) is the format I need. So, is there any other option for this?

Piranha
Chief II

You can pass any other data through global variables or other constructions and send an event to the task, which signals the necessity to process that data.

Pavel A.
Evangelist III

STM32L031 has only 8K RAM and 32K flash.

Not comfortable for FreeRTOS. Maybe only the co-routine variant.

Hi. For the timer you shared, does this timer server works on systick? or something else?