cancel
Showing results for 
Search instead for 
Did you mean: 

Oscillator interrupt is not raised after Ready -> Power Down -> Ready

LltWc
Associate III

I'm adding Power-Down mode to my Listen Mode implementation, and have come across some unexpected behavior.

I keep the chip in Power-Down, with the field detector set to automatic, and then see EON when a field is detected, as expected. The first time this happens, it behaves as expected (see first screenshot): the osc_ok bit was set automatically upon EON, then I set en and rx_en, and ~1ms millisecond later, the IRQ comes in.

 

LltWc_4-1737043647680.png

But the next time, 100-300ms after the previous emulation, it doesn't behave the same way. The osc_ok bit is set after EON, then I set en and rx_en, but the IRQ never comes in. This all the same logic as the previous cycle - so EON is definitely not masked, and should be coming in after ~1ms. Is there some logic/behavior here I'm missing?

LltWc_2-1737043315957.png

1 ACCEPTED SOLUTION

Accepted Solutions
LltWc
Associate III

Yet another one I solved right after posting!

For anyone who comes across the same problem - the issue was that for some reason on the second EON, the OSC interrupt came earlier than the first time, which resulted in it being caught in the main interrupt handler, not the special "run a command and wait for it" handler. I fixed this by just always checking for the osc_ok bit instead of relying on interrupts, and only waiting for the OSC interrupt if osc_ok wasn't set by the time I was confirming the mode change.

View solution in original post

1 REPLY 1
LltWc
Associate III

Yet another one I solved right after posting!

For anyone who comes across the same problem - the issue was that for some reason on the second EON, the OSC interrupt came earlier than the first time, which resulted in it being caught in the main interrupt handler, not the special "run a command and wait for it" handler. I fixed this by just always checking for the osc_ok bit instead of relying on interrupts, and only waiting for the OSC interrupt if osc_ok wasn't set by the time I was confirming the mode change.