Hi Everyone,
I am new in RTOS, I am currently working on a project in which I use freeRTOS. In the project there is 2 SPI (in which 1 is used for EEPROM and 1 is used for DISPLAY); 4 UARTS (in which 3 work on MODBUS protocol); 7 channels of ADC; PWM; Timmer Interrupts; 1 Keypad; watchdog; RTC; and GPIO’s included. I interface these with Nuvoton M453 mcu.
Can anyone guide me on some points that I listed below
For these how many numbers of tasks can I created which runs the code smoothly.
How can I set the priority as I check the MAX_SIZE is only 4.
How can I give size for each task that created.
Is there any instructions or recommendations where these all describes.
Can I run some part in main while loop or rest in tasks created while loop.
Which is better to use (mutex, semaphore and task notify)
Can I start or stop tasks from interrupt
How can I manage these all with RTOS.
Can anyone share me some reference or example code that can I prefer and code easily.
Thanks, in advanced, Kindly help me as I am new and gets confused.
configMAX_PRIORITIES is for task priorities and it does not depend on the hardware interrupt priorities. You can change it to a higher number if you need more task priorities.
Probably you‘re running of (heap) memory.
Did you define configASSERT properly and even more important do you check the return values of the FreeRTOS-API calls like xTaskCreate ?
It’s also good habit to also define configCHECK_FOR_STACK_OVERFLOW and maybe configUSE_MALLOC_FAILED_HOOK, too.
See e.g. Customization - FreeRTOS™
for further details.
yes, I define configASSERT as per the example provided by freeRTOS and also return values of the freeRTOS-API calls but how can I know it’s out of heap memory.