AnsweredAssumed Answered

SAR_ADC always in power down mode

Question asked by Andrea Roma on Sep 28, 2017
Latest reply on Oct 2, 2017 by Petr Stancik

Hello, I work with mpc5777m and i have a problem with SARADC_B.


I have to convert test channels 24 and 25 and have initialized the ADC in this way:

SARADC_B.MCR.R = 0x80000000; // enable result overwriting in scan mode     

SARADC_B.CTR [1] .R = 0x800000FF; // setup conversion time, 12bit max value     

SARADC_B.TCNCMR.R = 0x03000000; // enable channels 121 (Vbdg), 120 (TSENS0) to be sampled      SARADC_B.TCDR [24] .R = 0x01000000; // select CTR1 for channel 120 conversion     

SARADC_B.TCDR [25] .R = 0x01000000; // select CTR1 for channel 121 conversion


then i set bit start:

SARADC_B.MCR.B.NSTART = 1; / * Trigger normal conversions for test channels * /


and I wait the data to be valid   


while (SARADC_B.TCDR [25] .B.VALID! = 1) {};


the problem is that conversion does not start, as I can see from the MSR register. the ADC has remained in power-down and never goes into idle or other states


I have never set other clocks. 16mhz work with the Internal 16 MHz RC oscillator.


How can I fix the problem?