Hi everybody,
I have a lot of questions about interrupt possibility:
I try to explain my problem.
I have a I2C device that have a "ready" line that give a window to communicate with him. the µc can just use this window to communicate in this time.
this device (IQS259 Azoteq) have two mode "streaming mode" that give very often interrupt on ready line and "event mode" that give window just when a event occurs.
this device have a configurable power mode where we can enter a number that put the device in power mode, and self wake up every this number.
my problem is that I want to put my µc in power down mode and wake the µc with the device when an interrupt occurs. In the interrupt routine, I have a window to put the device IQS259 in streaming mode and then have often a window to communicate and do what I want.
but in streaming mode, the interrupt from the IQS are really really often, and then I can't do what I want with the first interrupt that a new interrupt occurs. Then the program stay in a loop of interrupt.
My question is: When I have a interrupt the programm goes in ISR and in this ISR is it possible to disable the interrupt, do what I want with this first interrupt and then enable again the interrupt ?
I have try to do this, but it doesn't work.
Then what is the solution please to activate a interrupt routine and disable interrupt in this routine to not take another interrupt before the first is complet ?
Thanks for your explains and help.
Best regards
Vincent
[b:be4bf50cad][color=red:be4bf50cad](BASCOM-AVR version : 2.0.7.6 )[/b:be4bf50cad][/color:be4bf50cad]
↧