ARM: KEIL RTX app ported to CMSIS RTOS does not run
Information in this knowledgebase article applies to:
I have ported a KEIL RTX based application for a Cortex-M target to use CMSIS RTOS. However, after that the application fails to run correctly and may also crash after some time.
One possible reason is the modification of the NVIC priority grouping during runtime. From the previous KEIL RTX you are probably aware, that such settings need to be done before the operating system is started e. g. in the main() function before the os_sys_init() call.
As the CMSIS RTOS is based on the KEIL RTX, it has the same requirements for changing the NVIC priority grouping configuration. But the big difference now is, that in the KEIL CMSIS RTOS, main() is already a thread and so the operating system started already when your program reaches main(). Modifying the NVIC priority grouping settings here, will now cause problems.
Put the code which configures the NVIC priority grouping in the part of the program, which runs before main(), e. g. in the SystemInit() function.
In the CMSIS-RTOS version 4.75, which was released with the CMSIS pack 4.2.0, the Interrupt Priority Grouping can also be configured between calls to osKernelInitialize() and osKernelStart().
Last Reviewed: Friday, December 18, 2015
of your data.