2006-08-11 05:01 AM
2006-08-03 09:36 PM
Well,
I'm currently doing some operations in a function and I don't want to be interrupt (I've got 4 sources of IRQ: TIM1(50kHz),TIM2(100kHz to 1,4Hz),TIM3(100kHz to 1,4Hz),ADC12(500Hz)). I count each line of code, and instead of disable EIC, maybe directly in ARM7 core would be faster. Thx all.2006-08-03 10:35 PM
To turn off the irq in the system add the following functions to an asm file. and call ARMIRQ_Disable() to turn off the irq at system level.
/* Disable the ARM7 core IRQ line */ ARMIRQ_Disable: MRS r0, CPSR ORR r0, r0, #I_Bit MSR CPSR_c, r0 BX lr /* Disable the ARM7 core FIQ line. */ ARMFIQ_Disable: MRS r0, CPSR ORR r0, r0, #F_Bit MSR CPSR_c, r0 BX lr /* Enable the ARM7 core IRQ line. */ ARMIRQ_Enable: MRS r0, CPSR BIC r0, r0,#I_Bit MSR CPSR_c, r0 BX lr /* Enable the ARM7 core FIQ line. */ ARMFIQ_Enable: MRS r0, CPSR BIC r0, r0,#F_Bit MSR CPSR_c, r0 BX lr These fucntions need to be done from a priveledged mode (not user mode) The best thing todo is run your program from system mode. Regards sjo2006-08-11 05:01 AM
Thx Sjo, i did it.