Hello,
I am using an S32K148 development board and I am trying to use ADC0 and ADC1. ADC0 is working properly but from some reason, I am not able to use ADC1, it seems like this is not enabled. The get_adc1_data() is printing any time value 0
Do you have any suggestion?
I am using the following code
const adc_converter_config_t adc_config_1_ConvConfig0 = {
.clockDivide = ADC_CLK_DIVIDE_2,
.sampleTime = 255U,
.resolution = ADC_RESOLUTION_8BIT,
.inputClock = ADC_CLK_ALT_1,
.trigger = ADC_TRIGGER_SOFTWARE,
.pretriggerSel = ADC_PRETRIGGER_SEL_PDB,
.triggerSel = ADC_TRIGGER_SEL_PDB,
.dmaEnable = false,
.voltageRef = ADC_VOLTAGEREF_VREF,
.continuousConvEnable = false,
.supplyMonitoringEnable = false
};
const adc_chan_config_t adc_config_1_ChnConfig0 = {
.interruptEnable = true,
.channel = ADC_INPUTCHAN_EXT17
};
const adc_converter_config_t adc_config_2_ConvConfig0 = {
.clockDivide = ADC_CLK_DIVIDE_2,
.sampleTime = 255U,
.resolution = ADC_RESOLUTION_8BIT,
.inputClock = ADC_CLK_ALT_1,
.trigger = ADC_TRIGGER_SOFTWARE,
.pretriggerSel = ADC_PRETRIGGER_SEL_PDB,
.triggerSel = ADC_TRIGGER_SEL_PDB,
.dmaEnable = false,
.voltageRef = ADC_VOLTAGEREF_VREF,
.continuousConvEnable = false,
.supplyMonitoringEnable = false
};
const adc_chan_config_t adc_config_2_ChnConfig0 = {
.interruptEnable = true,
.channel = ADC_INPUTCHAN_EXT13
};
Hi@mcristian
please change the below hightlight part to 0
Hello, Thanks for reply. You can find the project attached
Hi@mcristian
Can you provide me with a working project so that I can reproduce your problem?