How freeRTOS switch from MSP to PSP


How FreeRTOS switch from MSP to PSP?

Best Regards,

Assuming you’re talking about Cortex M ports, this code changes from MSP to PSP the first time. Other similar code in port.c changes from MSP to PSP when returning from interrupt handlers. You can look in the architecture reference manual to see how the return-address register LR (R14) uses special exception-return values.