Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi there
I am new to CortexM3 and was wondering a few of things:
(naked functions)
int irq_save_off() { asm("mrs r0, ipsr "); asm("ldr r1,=#0x1ff"); asm("ands r0,r0,r1"); asm("it ne"); asm("movne pc,lr"); asm("cpsid i"); asm("mov pc,lr"); } void irq_restore_on() { asm("ldr r1,=#0x1ff"); asm("ands r0,r0,r1"); asm("it ne"); asm("movne pc,lr"); asm("cpsie i"); asm("mov pc,lr"); }Any help really appreciated
Cheers
Charles