Bigger scale microcontrollers like STM32F103ZET6 are stuffed with lots of features that enable to run complex project. Practically it is advised to stick with some RTOS to keep project modular and maintainable. FreeRTOS doesn’t take much of processor resources but benefit a lot like allows parallelize functions/tasks with ease. Scienceprog takes us through process of building simple applications by using FreeRTOS on STM32 microcontroller.
Each task here is programmed individually without worries how it will be run, because while writing each it is supposed that all processor resources are available. And this is so because each task is managed by scheduler which takes care of business. From point of view everythink looks run like parallel tasks while in reality each task is performing in turn according to their priorities set. In following demo there are 5 tasks running: LED flashing, Button check, Button LEDs toggle, LCD and USART. Keep in mind that also there is always an idle task running that is created once scheduler is run. This is a great template to start with as it is a bit different from official FreeRTOS demo which is more generic.