cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupts: level / edge

Posted on November 28, 2008 at 13:15

Interrupts: level / edge

2 REPLIES 2
Posted on May 17, 2011 at 12:54

I've a interrupt input that's low while there's data for me, not an uncommon mode. The only config option I can find in the micro is for rising, falling or both edges. Is there not a ''level'' mode such that on exiting the IRQ handler the core re-detects the ''level'' and repeats until the data has been dealt with? Do I have to poll the input within the IRQ handler, moving data until it's negated?

The ARM manual (http://infocenter.arm.com/help/topic/com.arm.doc.ddi0337e/DDI0337E_cortex_m3_r1p1_trm.pdf) for the NVIC mentions ''Level vs pulse'' that looks just the ticket, but there's no mention in the ST blurb.

Anyone any ideas?

Also, what's the difference between a port pin interrupt and event?

tibo
Associate II
Posted on May 17, 2011 at 12:54

one solution is to set the pending bit of the irq at the end of the isr:

irq_pending_bit = ! irq_level

It is only one instruction and everything should work.