Keil Logo

ARM: How to Stop CMSIS RTX or RTX5 in Bootloader

Information in this knowledgebase article applies to:



I have an application and a bootloader that are separate projects that both use RTX5. What is the best strategy for disabling the RTOS in the bootloader before jumping to the application code?


The best way to stop RTX or RTX5 is to disable the SysTick interrupt that is used as the tick timer for the RTOS. The SysTick Interrupt can be disabled using the following code:

SysTick->CTRL &= ~0x00000002;           // disable SysTick interrupt

It is also recommended to disable any other peripheral interrupts at the peripheral level before jumping the application code. There is not a need to disable global interrupts as it is better to just disable individual peripheral interrupts in the bootloader. Then, enable the peripheral interrupts in the application code as the peripherals get initialized. After disabling peripheral interrupts in the bootloader, set the vector table offset register to the new vector location and then jump to the application code. Make sure the vector table offset is set in the system_xxx.c file in the application project so any interrupts that get enabled in the application jump to the correct handler.


Last Reviewed: Wednesday, May 10, 2017

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.