ASP bit in the CONTROL register

69 views Asked by At

how to set the ASP bit in the CONTROL register so that the thread code uses the PSP (the handler mode will always use the MSP) in tm4c123gh6pm.

1

There are 1 answers

0
user58697 On

As the documentation says,

To switch the stack pointer used in Thread mode to the PSP, either use the MSR instruction to set the ASP bit, as detailed in the CortexTM-M4 instruction set chapter in the ARMĀ® CortexTM-M4 Devices Generic User Guide (literature number ARM DUI 0553A), or perform an exception return to Thread mode with the appropriate EXC_RETURN value, as shown in Table 2-10 on page 111.