2007-09-04 11:02 AM
Enable/Disable Global Interrupts
2011-05-17 12:44 AM
Why are you using USER mode in main()? If you are using the default STR library, main runs from SYS mode. Look at 91x_init.s and ignore the comments (I hate comments like this. Most of the 91x library is littered with bad comments that are flat out wrong or misleading).
; --- Now change to USR/SYS mode and set up User mode stack, MSR CPSR_c, #Mode_SYS ; IRQs & FIQs are now enabled LDR SP, = SFE(CSTACK) & 0xFFFFFFF8 -Mark2011-05-17 12:44 AM
This was not intentional. I am using startup code supplied by Keil with a demo board supplied by them as well.
From their STR91x.sMSR CPSR_c, #Mode_USR
MOV SP, R0
SUB SL, SP, #USR_Stack_Size
IMPORT __main
LDR R0, =__main
BX R0