HI NXP,
Im learning how to trigger a ADC by software, so Im working on a demo adc_swtrigger_s32k144.
Im confused about this API "ADC_DRV_ConfigChan(ADC_INSTANCE, 0U, &adConv1_ChnConfig0)".
Im assuming that the "0U" here is supposed to be the 0 channel, like ADC0_SE0, but as a matter of fact, the ADC0_SE0 is not the working channel. The real working channel is ADC0_SE12, which is PTC14, just like the demo description says.
So whats the meaning of "0U" here?
Hi,
if software-triggered operation is selected, a conversion is initiated following a write to SC1A register (also defined as SC1[0], 0 is channel index)
And description of ADC_DRV_ConfigChan function says...
...Configures the selected control channel with the given configuration structure.
When Software Trigger mode is enabled, configuring control channel index 0, implicitly triggers a new conversion on the selected ADC input channel. Therefore, ADC_DRV_ConfigChan can be used for sw-triggering conversions...
BR, Petr