Hi,
in a current T4.1 project I came across the following problem:
While an ISR (triggered by a GPIO falling edge) is running and the same interrupt/edge appears, the ISR is not immediately triggered (= interrupted) again (as I expected),
but it seems that the ISR is immediately executed a second time after the first run ends. As if the second event is saved until the running ISR ended.
Background:
In the ISR SPI1 is used to request data from an external ADC, which sends data over the same pin that is observed by the edge triggered ISR. So while ISR is reading data,
the falling edge appears several times.
I've played around with noInterrupt()/interrupt() and cli()/sei() but this did not help. In the end I successfully used detachInterrupt()/attachInterrupt() inside the ISR.
Question: is there any better (= more elegant) way to solve this (except detachInterrupt/attachInterrupt) ?
Thanks in advance
in a current T4.1 project I came across the following problem:
While an ISR (triggered by a GPIO falling edge) is running and the same interrupt/edge appears, the ISR is not immediately triggered (= interrupted) again (as I expected),
but it seems that the ISR is immediately executed a second time after the first run ends. As if the second event is saved until the running ISR ended.
Background:
In the ISR SPI1 is used to request data from an external ADC, which sends data over the same pin that is observed by the edge triggered ISR. So while ISR is reading data,
the falling edge appears several times.
I've played around with noInterrupt()/interrupt() and cli()/sei() but this did not help. In the end I successfully used detachInterrupt()/attachInterrupt() inside the ISR.
Question: is there any better (= more elegant) way to solve this (except detachInterrupt/attachInterrupt) ?
Thanks in advance