Enable/Disable Global Interrupts
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2007-09-04 11:02 AM
Posted on September 04, 2007 at 20:02
Enable/Disable Global Interrupts
Labels:
- Labels:
-
Legacy Products
This discussion is locked. Please start a new topic to ask your question.
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 12:44 AM
Posted on May 17, 2011 at 09:44
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 -MarkOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 12:44 AM
Posted on May 17, 2011 at 09:44
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

- « Previous
-
- 1
- 2
- Next »