Merge branch 'untested'
This commit is contained in:
commit
efb6671bf7
15 changed files with 20 additions and 47 deletions
|
@ -4,12 +4,15 @@
|
|||
|
||||
#define reg32(x) (*(volatile uint32_t *)(x))
|
||||
|
||||
//__attribute__ ((interrupt("IRQ")))
|
||||
void isr(void)
|
||||
__attribute__ ((section (".irq")))
|
||||
__attribute__ ((interrupt("IRQ")))
|
||||
void irq(void)
|
||||
{
|
||||
// ISR_ENTRY();
|
||||
/* check for TMR0 interrupt */
|
||||
tmr_isr(); // led turns off if I have this, indicating that the isr does jump to tmr_isr
|
||||
if(tmr_isr != NULL) {
|
||||
tmr_isr(); // led turns off if I have this, indicating that the isr does jump to tmr_isr
|
||||
}
|
||||
// if(reg32(INTSRC) & (1<<5)) { tmr_isr(); }
|
||||
// asm("SUBS PC,R14_IRQ,#4")
|
||||
// enableIRQ(); // I think this is necessary, but the LED never turns off when I have this
|
||||
|
|
19
src/start.S
19
src/start.S
|
@ -215,19 +215,12 @@ not_used:
|
|||
|
||||
|
||||
.align 5
|
||||
irq:
|
||||
push {lr}
|
||||
movs lr,pc
|
||||
b isr
|
||||
pop {lr}
|
||||
subs pc,r14,#4 // suggested irq return cmd
|
||||
// STMFD sp!, {r0-r12,lr}
|
||||
// MOVNE lr,pc
|
||||
// ldr r0, =isr
|
||||
// BX r0
|
||||
// LDMFD r13!, {r0-r12,r14}
|
||||
// MOVS PC, R14
|
||||
// subs pc, r14, #4
|
||||
//irq:
|
||||
// push {lr}
|
||||
// movs lr,pc
|
||||
// b isr
|
||||
// pop {lr}
|
||||
// subs pc,r14,#4 // suggested irq return cmd
|
||||
fiq:
|
||||
|
||||
.align 5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue