How to stop IRQ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-08-11 5:01 AM
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-08-03 9:36 PM
Posted on August 04, 2006 at 06:36
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.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-08-03 10:35 PM
Posted on August 04, 2006 at 07:35
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 sjoOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-08-11 5:01 AM
Posted on August 11, 2006 at 14:01
Thx Sjo, i did it.
