How to change the priority of the main(main thread) when using RTOS
It is the usual practice in the RTOS. I set the most lowest priority to main thread, to be used as an idle task.
change the priority of the main thread
#include "mbed.h"
#include "rtos.h"
int main()
{
osThreadSetPriority(osThreadGetId(), osPriorityIdle);
while (true) {
...
}
}
1 comment on How to change the priority of the main(main thread) when using RTOS:
Please log in to post comments.

Hello Takuya-san,
It's a very handy hint. Thank you so much for sharing!
Best regards,
Zoltan