AnsweredAssumed Answered

Some ADC channel reading 0 in S32K146

Question asked by Deepthi Keshavan on Feb 3, 2020
Latest reply on Feb 4, 2020 by Petr Stancik

Inputs considered are on SE0, SE1 and SE5 on ADC0. Back to back triggering has been enabled. If SE5 is disabled, correct values are obtained on the SE0 and SE1 channels. When SE5 input is enabled, all the values (var1, var & var3) show up as 0.

 

Any help?

 

PDB0->MOD = 1200;
PDB0->IDLY =1200;

 

PDB0->CH[0].C1 = (PDB_C1_BB(0x02)
| PDB_C1_TOS(0x01)
| PDB_C1_EN(0x03));

 

ADC_DRV_ConfigChan(INST_ADCONV1, ADC_INPUTCHAN_EXT0, &adConv1_ChnConfig0);
ADC_DRV_ConfigChan(INST_ADCONV1, ADC_INPUTCHAN_EXT1, &adConv1_ChnConfig1);

ADC_DRV_ConfigChan(INST_ADCONV1, ADC_INPUTCHAN_EXT5, &adConv1_ChnConfig2);

 

ADC0->SC1[0] = ADC_SC1_ADCH(0); // SC1A[ADCH]
ADC0->SC1[1] = ADC_SC1_ADCH(1); // SC1B[ADCH]
ADC0->SC1[2] = ADC_SC1_ADCH(5); // SC1F[ADCH]

 

var1 = ADC0->R[0]; 
var2 = ADC0->R[1];
var3 = ADC0->R[5];

Outcomes