How to use ADC1_SE0 SE14 SE15 of S32K144

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use ADC1_SE0 SE14 SE15 of S32K144

1,503 Views
hiroyoshigomi
Contributor I

Dear Support Team,

I am working on evaluation board. I configured ADC1 for 4 channels using PDB. I refered the sample code below https://community.nxp.com/docs/DOC-332749.


But, ADC1_SE0 and SE14 and SE15 is not working.
  ADC1->SC1[0] = ADC_SC1_ADCH(7); //Working
  ADC1->SC1[1] = ADC_SC1_ADCH(14);  //Does not work
  ADC1->SC1[2] = ADC_SC1_ADCH(15);  //Does not work
  ADC1->SC1[3] = ADC_SC1_ADCH(0);   //Does not work

Each AD complete flag (COCO) is 1.
But the Result R[1:3] is not matches actual voltage. What should I do to use these ADC input? Ch interleave is disable.

And I tried below.

  ADC1->SC1[0] = ADC_SC1_ADCH(7); //Working
  ADC1->SC1[1] = ADC_SC1_ADCH(12);  //Working
  ADC1->SC1[2] = ADC_SC1_ADCH(13);  //Working
  ADC1->SC1[3] = ADC_SC1_ADCH(10);   //Working

Each AD channel is working.
What is the difference?

1 Reply

881 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I have modified that example, added PDB1/ADC1 and selected mentioned channels.

When I connected potentiometer output (at pin PTC14) to port of certain ADC1 channel on the EVB I got correct result.

Just channels 14/15 (pins PTB15/PTB16) are connected to the SBC's SPI lines, so the result could be affected.

All other channels are left, no issue should be seen.

If you see the wrong result, please describe what voltage is connected to each pins and what is the measured value.

Note: To meet accuracy specifications, the ADC module must be calibrated using the on-chip calibration function.

The ADC calibration is described in the RM. See chapter 39.5.6 Calibration function for steps that must be done.

BR, Petr