Intermittent wake up from external interrupt

Using bare to metal ATMEGA328 and RTC to wake it up from power-down using attachInterrupt(digitalPinToInterrupt(INT0), ISR_R, FALLING); from <LowPower.h>. I have a batch of around 100 products and found that some just fail to wake up. Once they are apparently dead and not asleep, even with a hard pull down by hand on INT0 pin they won't wake up. Only a hard reset raises them from the apparent dead. Those units that fail are also marginal and sometime work. I am using an external crystal. Mystified.

Does INT0 resolve to 2 or have you just loosely summarised your code ?
Anyway, it is probably best to post the code and a schematic diagram.
Can you tell by the current consumption if these hard to wake devices are actually in sleep mode or just looping elsewhere?
Are you convinced that the interrupt signal delivered by the RTC is sufficient to reliably trigger an external interrupt on the MCU ?

Just for completeness, I cured the issue by changing the external interrupt from falling to low level and all worked well. It's still a mystery -the falling edge was pretty clean on the scope relying on the internal pull-up. The chip just didn't seem to recognise the falling edge intermittently.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.