i've done the portage of IRQ project to anglia IDE. :-] keep me informed about any issue. regards. MBS 8-) [ This message was edited by: MBS on 13-04-2007 17:38 ]
Can somebody explain IDISABLE and IENABLE macros. In my project when I leave interrupt with IDISABLE macro at the end my program stops.
I still have problem with this VIC0 and VIC1 problem, can somebody overcome this problem finally. I need a sample code for Anglia Compiler with two interrupts with form different VIC's, Please help because my boss will kill me :) best regards, J.O.
Sorry, i've tried this example with IAR and RIDE and it works fine but i've just compile with ANGLIA .(no flash link)
Quote:
I think the problem is in section #define IENABLE asm('' MRS LR, SPSR''); /* Copy SPSR_irq to LR */ asm(''STMFD SP!, {LR} ''); /* Save SPSR_irq */ asm(''MSR CPSR_c, #0x1F ''); /* Enable IRQ (Sys Mode) */ asm(''STMFD SP!, {LR} '') ; /* Save LR */ #define IDISABLE asm(''LDMFD SP!, {LR}'') ; /* Restore LR */ asm(''MSR CPSR_c, #0x92'') ; /* Disable IRQ (IRQ Mode) */ asm(''LDMFD SP!, {LR}'') ; /* Restore SPSR_irq to LR */ asm(''MSR SPSR_cxsf, LR'') ; /* Copy LR to SPSR_irq */ try the attached project, i've just deleted these functions and replace them by their code in the different interrupt functions. 8-) Best regards MBS
Sorry, but this program doesn't work. It compiles correct, but the interrupts stop program If I switch off interrupts //VIC_ITCmd(TIM0_ITLine, ENABLE); //VIC_ITCmd(RTC_ITLine, ENABLE); program works correctly I think the problem is in section #define IENABLE asm('' MRS LR, SPSR''); /* Copy SPSR_irq to LR */ asm(''STMFD SP!, {LR} ''); /* Save SPSR_irq */ asm(''MSR CPSR_c, #0x1F ''); /* Enable IRQ (Sys Mode) */ asm(''STMFD SP!, {LR} '') ; /* Save LR */ #define IDISABLE asm(''LDMFD SP!, {LR}'') ; /* Restore LR */ asm(''MSR CPSR_c, #0x92'') ; /* Disable IRQ (IRQ Mode) */ asm(''LDMFD SP!, {LR}'') ; /* Restore SPSR_irq to LR */ asm(''MSR SPSR_cxsf, LR'') ; /* Copy LR to SPSR_irq */ I just added delay() function and port GPIO7 (diodes), I use MCB-STR9 starter kit Regards, Greg