Embedded Software Interview – Peripheral Section: 5-MCU Code Debugging
When the MCU code crashes, first determine whether the current stack being used is the MSP (Main Stack) or the PSP (Process Stack). After an exception occurs, the stack order of the ARM core is as follows: R0-> R1->R2->R3->R12->LR->PC->XPSR The LR (R14) register is the link register, which stores the exception return value EXC_RETURN where … Read more