i found in the blinky example a way running it in c-code:
add following lines in startup.s:
# LDR PC, IRQ_Addr
LDR PC, [PC, #-0x0FF0] /* Vector from VicVectAddr */
# Memory Mapping (when Interrupt Vectors are in RAM)
.equ MEMMAP, 0xE01FC040 /* Memory Mapping Control */
.ifdef RAM_INTVEC
LDR R0, =MEMMAP
MOV R1, #2
STR R1, [R0]
.endif
and in my c interruptroutine:
void pos_inter (void)__attribute__((interrupt));
VICVectAddr1 = (unsigned long)trigger_inter;
void trigger_inter (void){
// ... do something and reset interruptflag
VICVectAddr = 0;
}
so it works fine. thanks to richard.
b regardsMessage
Re: handle an interrupt with c-code
2004-09-09 by supertoll_trinity
Attachments
- No local attachments were found for this message.