2010-09-20 05:06 AM
how to suspend and resume an external interrupt?
2011-05-17 06:10 AM
Hi Luzeiro,
Try to use enableInterrupts() and disableInterrupts(). Tell me if it is OK. That interests me ! Good luck ! Ciao, MCU Lüfter2011-05-17 06:10 AM
I dont think disable all interrupts is a good ideia so it possible disables all priority interrupts.
I found that for the external pin example, the STM8L have several types of interrpts, that is: fallen edge and low, fallen edge, rise edge, rise edge and high. that means I expect use onde ''edge and..'' if I enable the interrupt after the edge event ocours, the line is still low or high so the event will be attended. I didnt test it, but I hope it works.. MRL2011-05-17 06:10 AM
Hi luzeiro,
If I have well read the spec, there is four types: rising, falling, rising and falling, falling and low level. I think that only falling and low level can suits you. Using ''enableInterrupts() and disableInterrupts()''don't clear the interrupt pending bit. critial_function() { disableInterrupts() code... //<<<--- event interrupt code... code... enableInterrupts(); } // <<<--- ISR called so event is not missed Regards, MCU Lüfter