How to use multiple channel of  ADC of S32K144

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

How to use multiple channel of  ADC of S32K144

5,686 Views
nitinverma
Contributor III

Dear Support Team,

  I am working on evaluation board.I wanted to configure ADC for Multiple channel(SC1A-SC1F)for ADC1. Software trigger is configured as ADC trigger.I configured 1st analog input over SC1A and then successively upto SC1F. I am initiating conversion using SC1A and getting result in ADC_RA register but not getting anything other than 0 in SC1B-SC1F.Now I i am mapping 6 input over SC1A one by one after storing ADC_RA in some variable it is exhausting to the CPU.I wanted to use 6 different channel for 6 different analog inputs.Please help to resolve the problem.

Labels (1)
9 Replies

3,123 Views
kubsztal
Contributor II

"ADC doesn’t support the sequential conversion for multiple channels using a single software trigger."

Then how "continuous conversion" (SC3->ADCO) is supposed to work? Is it available only for one single channel (SC1A) in case of a SW trigger? And how it works in case of HW triggers where every channel has to be triggered separately anyway?

0 Kudos

3,123 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

ADC doesn’t support the sequential conversion for multiple channels using a single software trigger. Moreover just a SC1A can be used for software trigger. None of the SC1B-SC1n registers are used for software trigger operation.

You should involve the PDB to trigger multiple channels.

BR, Petr

3,123 Views
kristyballov
Contributor II

Did you get a solution? I wanted help with that too...

0 Kudos

3,123 Views
kristyballov
Contributor II

Hey I have the same problem, can you provide a sample example for continuous trigger of 6 ADC channels or continous trigger after a delay?

0 Kudos

3,123 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Kristi,

you can refer here https://community.nxp.com/docs/DOC-332749 

BR, Petr

0 Kudos

3,123 Views
kristyballov
Contributor II

Thanks Petr,

I am confused about how converted data is written on the Register, suppose I am using 6 channels suppose PTD2,PTA3,PTA2 of ADC1 and so on for ADC0... How is the result stored in the data result register according to the channels? Please help

0 Kudos

3,123 Views
nitinverma
Contributor III

Dear Kristi,

There is a dedicated result register(RA,RB.. and so on) for each channel of both ADC module(ADC0,ADC1).Once the conversion is completed for a channel result is stored in corresponding result register and COCO(conversion complete) bit is set in corresponding SC1 register.Once you read the result register COCO bit will automatically clear.

0 Kudos

3,123 Views
stabilo
Contributor II

Hi,

Is it possible to trigger ADC0 and ADC1 with the same software trigger (using TRGMUX) as they can measure simultaneously ?

Thank you.

0 Kudos

3,123 Views
nitinverma
Contributor III

Thanks Petr.

I did it using PDB.

0 Kudos