Annex context_switch Function Pointer

This function pointer is part of the swc_hal_t structure. It contains Wireless Core function pointers required to interact with microcontroller peripherals.

    void (*context_switch)(void);               /*!< Context switch function pointer */


The context switch is a software interrupt trigger to force the CPU to get into the interrupt handler. The EVK1.4 platform uses an ARM Cortex MCU which has a built-in interrupt-driven request for system-level service called PendSV.

For a priority list example, see the Annex EVK1.4 MCU Priority List

In the SDK, this is implemented by this EVK1.4 BSP function:

void evk_radio_callback_context_switch(void)

Induce a context switch to the pendSV ISR.


It is possible to handle this context switch with the use of an RTOS.

Return to Wireless Core article