Hi,
I am working on S32K148-EVB, where i am able use the Single channel/input from sensor using ADC0 (example code adc_swtrigger_s32k148 from NXM community) and now i want to read multiple sensor data using ADC0 with different channels/inputs for this i have tried this by configuring ADC converter with one more ADC channel and the result is
Hi,
use HW triggered mode. You can find demo example for it in S32DS too, just modify it and add channels you need.
You can also refer to https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-PDB-ADC-DMA-S32DS-ARM-2018-R1/ta-p/...
BR, Petr
Hi PetrS,
Thank you for your response, i will check with HW triggered mode
and the link you shared for reference, from that i have downloaded the zip file but it is empty, please share me the file again if possible it will be really helpful
Best regards,
Kallappa
Hi PetrS,
Can you please tell about this,
* with the NXM example code if i want to read the ADC input with other pins how i can achieve this(As i have tried to change channel number in macro but didn't worked for me)
in example code : As ADC data is reading from input/channel-12 from ADC0 i.e PTC14
so if want to read ADC data from some other pin like PTC19 or any other
Please let me about this
Thanks & regards,
Kallappa
Hi,
what is NXM example?
If checking SDK adc_swtrigegr_s32k148 demo example chanell 28 is converted (PTC28 pin, connected with potentiometer on EVB). So value 0x2C is written to SC1A register. Refer to SC1A[ADCH] description in the RM.
BR, Petr
Hi PetrS,
Thanks for sharing the code,
I am able to read the analog voltage from deferent pins at a time with adc_hwtrigegr_s32k148 demo example(1 sensor output on different ADC0 channel PTC14 or PTC19 one at a time) but when i tried to read two different sensor output on ADC0 channel PTC14(Sensor1) and PTC19(Sensor2) i am not getting sensor data on any of the pin i have attached code here, kindly let me know where i am doing wrong
and the code shared (S32K144_PDB_ADC_DMA_sdk_rtm_300.zip) is using DMA, Timers etc so it is quite difficult understand so please let me what is problem here
Thanks,
Kallappa
Hi PetrS,
Actually i am trying this ADC0 with multi channel in S32K148,
and now i am porting S32K144_PDB_ADC_DMA_sdk_rtm_300 and i will check how this works
Thanks,
Kallappa