79722353

Date: 2025-08-01 10:20:16
Score: 1
Natty:
Report link

They are part of the core register set of ARM Cortex-M (R13) processors, selection of stack pointer depends on if the program is in handler mode where the main stack pointer is used or user-defined thread/processes where there is a option ither to use MSP,PSP.

when the MCU resets it starts with the top of nested vector table and the MSP will be the default stack pointer as On reset, MSP is initialized from the first entry in the vector table.

In FreeRTOS, for example, MSP is used by the scheduler and PSP is given to user tasks.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Shreyas Bhat