Context Switch- RL-ARM

Hello,

i am starting to work with RL-ARM for CortexM3, and i have checking the manual. I miss more info about the context switch in CortexM3 using the RL-ARM. Another operating systems use the PendSVHandler() exception that executes after the last nested ISR to do the context switch. Pls. could someone clarify me how it is it done in RL-ARM, and where is located the code that does it?

Many thanks
Alberto

Parents
  • RL-RTX for Cortex-M3 uses PendSV_Handler, SysTick_Handler and SVC_Handler for the context switch. All 3 are a part of the OS Extension in Cortex-M core, so it is optimal to use all 3 of them, not just one.

    For an explicit task switch (on os_tsk_pass, os_evt_wait, etc.) the SVC_Handler is used. This is because all RTX system code is executed in SVC mode.

    On timeout, the SysTick_Handler is used for the context switch (when a task delay has expired, etc.). RTX for Cortex-M3 uses SysTick timer to generate RTX ticks.

    On asynchronous events (isr function calls from interrupt handlers), a PendSV_Handler is used for the context switch.

Reply
  • RL-RTX for Cortex-M3 uses PendSV_Handler, SysTick_Handler and SVC_Handler for the context switch. All 3 are a part of the OS Extension in Cortex-M core, so it is optimal to use all 3 of them, not just one.

    For an explicit task switch (on os_tsk_pass, os_evt_wait, etc.) the SVC_Handler is used. This is because all RTX system code is executed in SVC mode.

    On timeout, the SysTick_Handler is used for the context switch (when a task delay has expired, etc.). RTX for Cortex-M3 uses SysTick timer to generate RTX ticks.

    On asynchronous events (isr function calls from interrupt handlers), a PendSV_Handler is used for the context switch.

Children
More questions in this forum