The code generated using halcogen with IRQ's configured in dispatch mode,
My application runs in to Undefined mode on power-up but works fine in debug mode(Just i have to initiate a soft reset)
Let me know if anyone facing similar issue.
For further information
My interrupt Vectors:
resetEntry
b _c_int00
undefEntry
b undefEntry
svcEntry
b SvcHandler
prefetchEntry
b prefetchEntry
dataEntry
b dataEntry
reservedEntry
b phantomInterrupt
irqEntry
b irqDispatch
fiqEntry
ldr pc,[pc,#-0x1b0]
My Dispatcher code snippet looks like this:
.arm
.sect ".text::irqDispatch"
.global irqDispatch
.armfunc irqDispatch
irqDispatch: .asmfunc
STMFD sp!, {r0-r3,r12,lr} ; store the user mode registers on irq-stack.
BL AppIrqHandler ; Jump to the exception handler, branch with link
MOV r3,#0...
.....
......
$EXIT:
LDMFD sp!,{r0-r3,r12,lr} ; Pop new user registers + return address(lr) from stack
SUBS pc,lr,#4 ; Load PC with lr-4 , this should carryout the switching
Thanks in advance.