S08QE128 ADC generates interrupts when disabled

cancel
Showing results for 
Search instead for 
Did you mean: 

S08QE128 ADC generates interrupts when disabled

155 Views
Contributor V

Greetings --

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?

Thanks

Gary Olmstead

0 Kudos
5 Replies

4 Views
Contributor V

Well, there are a boatload of interrupts that can wake the processor.  It uses:

    all 16 key inputs (one interrupt between them).  These are working properly.

 - an external real time clock that is not stuffed on this board, but worked perfectly on the previous board.

 - a serial port connected  to a USB port for debugging.  This is working properly.

  - an external Bluetooth card attached to the other serial port (not stuffed on this board,but worked on the previous board.

 - and several inputs that would have gone on Key inputs, but there weren't any left, so they ended up as input capture inputs and interrupts.  These are all stuffed and working properly.

It does have an internal real time clock that generates an interrupt every one millisecond, but that should be disabled during sleep mode.

The board is sitting here on my bench, so I know that no external interrupts are being triggered.

I'd send you something,but I don't know if the program will do anything sensible without hardware. Besides, the program  is enormous, the largest I've ever written by quite a lot.

I will make sure the internal RTC is really shutting down, and if it is, then I will write a new project that just uses the ADC

module, and see what happens.

Gary

0 Kudos

4 Views
NXP TechSupport
NXP TechSupport

Please let me know the results

have a good day.

Vicente

0 Kudos

4 Views
Contributor V

I worked on another project for a couple days, and when I went back to this one, the problem had disappeared.  I didn't change anything, it just vanished.

0 Kudos

4 Views
NXP TechSupport
NXP TechSupport

mmm, ok, let me know if have any news

Regards

0 Kudos

4 Views
NXP TechSupport
NXP TechSupport

This is weird, what is the normal wake up interrupt, is this a time?

Can you share a project where I can reproduce the problem?

Maybe you can start to disable modules in order to try to find why the QE is waking up.

Regards

0 Kudos