AnsweredAssumed Answered

Configure MCU to wake up from STOP2 only on specific ADC channel input

Question asked by Akshay Kulkarni on Dec 10, 2018
Latest reply on Jan 13, 2019 by Akshay Kulkarni

I am working on S32K144 MCU EVB and currently consuming N channels of ADC0. Scenario I am looking for is as below :

1] Keep reading all channels of ADC0. 

2] If digital value of channel 2 goes below certain threshold then move to STOP2 power mode.

3] BEFORE moving to STOP2 disable interrupts from other ADC channels and just monitor channel 2 (put a greater than HW configuration).

4] I want ADC0 to trigger an interrupt and exit STOP2 mode only if channel 2 value is greater than threshold value.


Problem is, I am properly able to read all channels of ADC0 and able to find step 2 i.e. able to move in STOP2 state. BUT as soon as MCU moves to STOP2 it comes out of it due to ADC interrupt. I tried to apply hardware comparison before moving to STOP2 state. Configured channel 2 after that. ADC0 is NOT in continuous mode and SW trigger is used.

Please shed some light on how I can only enable 2nd channel to generate interrupt  before moving to STOP2 and disable other ADC channels. This will be a great help.