I am (still) using an S08QE128 and CW11.1. The program is working well, but I want it to go to sleep between activities. The sleep and wake up processes are working, but the ADC interrupt is causing it to wake up prematurely. That is odd, considering I am not ever turning the ADC on.
I set a breakpoint where the program wakes up again, and the CW debug trace window says that the ADC interrupt has gone off. Sorry, I can't do a copy/paste of the debug window, but here it are the contents:
4692DC CW11 V7_FLASH_PnE_Cyclone PRO (CodeWarrior)
HCS08, 4602DCCCW11V7.abs (Suspended)
Thread [ID:0x0](Suspended: Breakpoint hit.)
3 main() main.c:343:0x0097a5 << this is the first instruction after the WAIT instruction.
2 ADC_interrupt() ADC.c:178 0x0043e9
1 0x002706 (0x002706)() 0x02706
When I examine the ADCSC1 register, the contents are 0x1f, which should be "ADC disabled."
My questions are, how is that possible? And how can I prevent it?