Triggering ADC by softeare

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

Triggering ADC by softeare

793 Views
jaylou
Contributor I

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?

0 Kudos
Reply
1 Reply

777 Views
PetrS
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply