Multiple ADC channel reading by PDB trigger using S32K144

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

Multiple ADC channel reading by PDB trigger using S32K144

961 Views
rohit1749
Contributor III

I''m uI have modified the example: adc_hwtrigger_s32k144 to read PTD2(ADC1 channel 2) and PTE6(ADC1 channel 11) using PDB trigger. But only PTD2 pin can be read. PTE6 pin reads as 0.

I have attached the modified codebase below. Can someone tell me where I'm going wrong and how to read multiple adc channels correctly using PDB trigger.

0 Kudos
Reply
2 Replies

947 Views
_Leo_
NXP TechSupport
NXP TechSupport

Thank you for your interest in our products and for contributing to our community.

For development with S32K144 (or any other S32K1 derivative) we recommend to use the latest S32DS and RTD versions:

• S32 Design Studio 3.6.2 – Windows/Linux
• S32K1_S32M24X Real Time Drivers AUTOSAR R21-11 Version 3.0.0

To download IDE, go to S32 Design Studio for S32 Platform page -> Downloads ->
S32 Design Studio 3.6.2 – Windows/Linux

To download RTD, go to S32K1 page -> Design Resources -> Software-> Real-Time Drivers for S32K1 -> Automotive SW - S32K1_S32M24x - Real-Time Drivers for Cortex-M

Please check before Release Notes for installation flow/details to each SW.

Once you have installed SW, you could refer to ADC examples:

_Leo__0-1750970058220.png

I hope this information is helpful.

0 Kudos
Reply

938 Views
rohit1749
Contributor III

Hi Leo,

The shown example reads only single adc channel. But, I want to read multiple adc channels simultaneously, that's where I'm facing difficulty. I have modified the the below example to read  analog values from PTD2 (ADC1 channel2)and PE6(ADC1 channel 11) pins. But, I'm only able to read 1 pin at a time.

rohit1749_0-1750995428468.png

I think I have configured the adcPreTriggerIdx wrongly. Please find the configured adcPreTriggerIdx below.

const pdb_adc_pretrigger_config_t pdb_1_adcTrigConfig0 = {
.adcPreTriggerIdx = 0U,
.preTriggerEnable = true,
.preTriggerOutputEnable = true,
.preTriggerBackToBackEnable = false
};

const pdb_adc_pretrigger_config_t pdb_1_adcTrigConfig1 = {
.adcPreTriggerIdx = 3U,
.preTriggerEnable = true,
.preTriggerOutputEnable = true,
.preTriggerBackToBackEnable = true
};

Could you please help me with this.

Regards

Rohit

 

0 Kudos
Reply