Some Adc channels always returning 0

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

Some Adc channels always returning 0

Jump to solution
1,807 Views
AnthonyPinard
Contributor I

Hello all, 

I am using S32K312, RTD 2.0.3 and Tresos 29.0.0

I have a problem with the ADC module. Currently, Adc0 is SW triggered and Adc1 is triggered by the BCTU. Everything works great except for a small detail.... two channels of the Adc0 instance are always returning 0.

Six of the eight channels are returning perfectly coherent values while channels S8 and S9 always read 0 when there is in fact a voltage applied on their pin. (confirmed with scope) The NCMR1 register reads 0x0000_047B, which means the concerned channels are supposed to be converted. The 8 channels are in the same group, and they are all configured the same way. The pins are all configured as the right Adc channel.

I tried triggering Adc0 by Hw and with the BCTU, but it did not help my cause. I also tried shutting off Adc1 to see if it was interrupting Adc0. Finally, I tried triggering only the two problematic channels but, they still read 0.

Any idea what could be causing this issue? 

 

Thanks,

0 Kudos
Reply
1 Solution
1,792 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Which two pins do you connect the analog signals of ADC0 S8 and S9 to? There is a bug in RTD 2.0.x that may cause this problem. Please see the discussion here: S32K312 - ADC Problem


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
3 Replies
1,793 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Which two pins do you connect the analog signals of ADC0 S8 and S9 to? There is a bug in RTD 2.0.x that may cause this problem. Please see the discussion here: S32K312 - ADC Problem


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,780 Views
AnthonyPinard
Contributor I

Hi Robin, 

The two channels are PTA0 and PTA1. However, I noticed that the channels are triggering on pins PTB13 and PTB14, which are configured as GPIOs. 

Is it because ADC0_S8 and ADC0_S9 are supposed to be only available through the port B and not port A?

Thanks

0 Kudos
Reply
1,755 Views
Robin_Shen
NXP TechSupport
NXP TechSupport
0 Kudos
Reply