Skip to main content
BVu
Associate III
January 3, 2021
Solved

FreeRTOS task priority versus CMIS_RTOS v1

  • January 3, 2021
  • 2 replies
  • 1477 views

I'm using FreeRTOS v10.2.1, CMSIS RTOS v1 

main.c (generated by CubeMX) has:

...

osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 128);

...

where osPriorityNormal is zero as defined in cmsis_os.h

I spawn all other tasks using the FreeRTOS xTaskCreate call where task priority is from 0..MAX_PRIORITIES-1. How does FreeRTOS task priority maps to CMSIS task priority if it maps at all? The reason i ask is that if i keep StartDefaultTask alive, how does it get scheduled against those tasks created with xTaskCreate?

This topic has been closed for replies.
Best answer by BVu

The cmsis->FreeRTOS priority map is done in cmsis_os.c, makeFreeRtosPriority().

2 replies

KnarfB
Super User
January 4, 2021

You may check the source code to find out.

BVu
BVuAuthorBest answer
Associate III
January 4, 2021

The cmsis->FreeRTOS priority map is done in cmsis_os.c, makeFreeRtosPriority().