Jump to bootloader from RTOS task

I need update my RTOS firmware via a bootloader during RTOS is running, there is a task to monitor the UART commands, if it is update firmware call, then it will jump to bootloader. My bootloader works fine without RTOS, but it does’t work in my RTOS. Before jump to bootloader (RTOS is not running in bootloader), should I do something? such as stop the scheduler.
Is someone get the experience for similar function? Regards
Samuel

Jump to bootloader from RTOS task

Bootloaders work in lots of different ways and operate differently on different chips. As a minimum you should stop the tick interrupt somehow.

Jump to bootloader from RTOS task

Since, I presume, the boot loader is going to overwrite the main program, thus any interrupts that would go into the main program need to be disabled, or you are vey likely to run into problems, like the interrupt vector might not be pointing to the interrupt routine if one has been updated at the time but not the other. This tends to end with a program crash.

Jump to bootloader from RTOS task

I disable System Tick Interrupt before jump to the bootloader, then it works.