S32K144 ADC

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

S32K144 ADC

Jump to solution
4,249 Views
sushma
Contributor III

Hello.

I'm able to get the values of one ADC port through processor expert, what are the changes that has to be made in order to get the adc port readings of a channel.

I have connected PTA0( ADC0_SE0 - convertAdcChan(0)) to 3.3V onboard and PTA1( ADC0_SE1 - convertAdcChan(1)) to 5V onboard. How does adding more Convertor configuration affects the adc channel conversions. I have attached the screenshot and the code within. Kindly go through and let me know how to fix this.

Thank you.

pastedImage_1.pngpastedImage_1.png

Labels (1)
Tags (1)
0 Kudos
1 Solution
3,674 Views
sushma
Contributor III

Hello Diana,

I updated the software, I got the example ; I made slight changes in the adc_pal example to read adc values of EXT1 i.e PTA1 ; yet I'm not getting the reading ; where am I going wrong? The 0.00 reading in the screenshot is the PTA1 reading (attached to 3.3V onboard)

and I have attached the changes in the example I made. Also tell me can I make changes in adc_pal1_ChansArray00 to read multiple adc channel (second sccreenshot) ; the code is getting struck in a default ISR, if I'm changing the values of a adc_pal1_ChansArray00 and adc_pal1_ChansArray02. 

pastedImage_1.png

pastedImage_2.png

View solution in original post

0 Kudos
5 Replies
3,674 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

Only SCIA can be used for software trigger.
So, you can trigger only a single channel with a write to SCIA. The chanIndex (parameter of the ADC_DRV functions) should be always 0.

If you want to trigger more channels you can look at the S32DS Project from Example: adc_pal_S32K144

The example uses ADC PAL for a series of SW and HW triggered groups of conversions. 

I hope it helps.

Best Regards,

Diana

0 Kudos
3,137 Views
Kallappa
Contributor III

Hi Dianabatrlova,

I am having different version of SDK so can you pleas share that S32DS Project from Example: adc_pal_S32K144, it will be really helpful to me 

as i am facing issue with interfacing ADC with multiple channels so kindly look at this ticket and let me how to achieve this multiple channel with single ADC module link is here https://community.nxp.com/t5/S32K/ADC0-with-mutli-channel-inputs-S32K148EVB/m-p/1335520#M11991

I am trying this ADC interfacing on S32K148-EVB with

SDK i am having : S32SDK_S32K14x_EAR_0.8.4
IDE : S32DS_ARM_v2.0

Thanks in advance,
BR,
Kallappa 

0 Kudos
3,674 Views
sushma
Contributor III

Hello Diana,

I'm not able to get the adc_pal_S32K144 example, Can I instead use ADC_s32k144 example and convert into a processor expert generated code?? And do tell me how to convert it into auto generated code?

pastedImage_1.pngpastedImage_2.pngpastedImage_3.png

0 Kudos
3,674 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Sushma,

You cannot open the example project probably because of the older SDK version. For me, it is working without any problem.

Which SDK version do you have?

The ADC_s32k144 example uses only a software trigger. So, this is not a solution for you.

For the ADC0 you can trigger only a single channel with a write to SCIA.

That is why I recommend you to look at the SDK Peripheral Abstraction Layer (ADC PAL) which is used in the adc_pal_S32K144 example.

Or you can use both ADC1, ADC0 and configure SW trigger for PTA0(ADC0_SE0) and for example, for PTA2 (ADC1_SE0). 

Best Regards,

Diana

3,675 Views
sushma
Contributor III

Hello Diana,

I updated the software, I got the example ; I made slight changes in the adc_pal example to read adc values of EXT1 i.e PTA1 ; yet I'm not getting the reading ; where am I going wrong? The 0.00 reading in the screenshot is the PTA1 reading (attached to 3.3V onboard)

and I have attached the changes in the example I made. Also tell me can I make changes in adc_pal1_ChansArray00 to read multiple adc channel (second sccreenshot) ; the code is getting struck in a default ISR, if I'm changing the values of a adc_pal1_ChansArray00 and adc_pal1_ChansArray02. 

pastedImage_1.png

pastedImage_2.png

0 Kudos