Some Adc channels always returning 0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Some Adc channels always returning 0

跳至解决方案
2,751 次查看
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 项奖励
回复
1 解答
2,736 次查看
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 项奖励
回复
3 回复数
2,737 次查看
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 项奖励
回复
2,724 次查看
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 项奖励
回复
2,699 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport
0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1902816%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E4%B8%80%E4%BA%9B%20Adc%20%E9%80%9A%E9%81%93%E6%80%BB%E6%98%AF%E8%BF%94%E5%9B%9E%200%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1902816%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%20S32K312%E3%80%81RTD%202.0.3%20%E5%92%8C%20Tresos%2029.0.0%3C%2FP%3E%3CP%3E%E6%88%91%E7%9A%84%20ADC%20%E6%A8%A1%E5%9D%97%E6%9C%89%E9%97%AE%E9%A2%98%E3%80%82%E7%9B%AE%E5%89%8D%EF%BC%8CAdc0%20%E7%94%B1%20SW%20%E8%A7%A6%E5%8F%91%EF%BC%8C%E8%80%8C%20Adc1%20%E7%94%B1%20BCTU%20%E8%A7%A6%E5%8F%91%E3%80%82%E9%99%A4%E4%BA%86%E4%B8%80%E4%B8%AA%E5%B0%8F%E7%BB%86%E8%8A%82%E4%B9%8B%E5%A4%96%EF%BC%8C%E4%B8%80%E5%88%87%E9%83%BD%E8%BF%90%E8%A1%8C%E8%89%AF%E5%A5%BD......Adc0%20%E5%AE%9E%E4%BE%8B%E7%9A%84%E4%B8%A4%E4%B8%AA%E9%80%9A%E9%81%93%E5%A7%8B%E7%BB%88%E8%BF%94%E5%9B%9E%200%E3%80%82%3C%2FP%3E%3CP%3E%E5%85%AB%E4%B8%AA%E9%80%9A%E9%81%93%E4%B8%AD%E7%9A%84%E5%85%AD%E4%B8%AA%E8%BF%94%E5%9B%9E%E5%AE%8C%E5%85%A8%E4%B8%80%E8%87%B4%E7%9A%84%E5%80%BC%EF%BC%8C%E8%80%8C%E5%BD%93%E9%80%9A%E9%81%93%20S8%20%E5%92%8C%20S9%20%E7%9A%84%E5%BC%95%E8%84%9A%E4%B8%8A%E5%AE%9E%E9%99%85%E4%B8%8A%E6%96%BD%E5%8A%A0%E6%9C%89%E7%94%B5%E5%8E%8B%E6%97%B6%EF%BC%8C%E5%AE%83%E4%BB%AC%E7%9A%84%E8%AF%BB%E6%95%B0%E5%A7%8B%E7%BB%88%E4%B8%BA%200%E3%80%82%EF%BC%88%E7%BB%8F%E8%8C%83%E5%9B%B4%E7%A1%AE%E8%AE%A4%EF%BC%89NCMR1%20%E5%AF%84%E5%AD%98%E5%99%A8%E8%AF%BB%E5%8F%96%200x0000_047B%EF%BC%8C%E8%BF%99%E6%84%8F%E5%91%B3%E7%9D%80%E7%9B%B8%E5%85%B3%E9%80%9A%E9%81%93%E5%BA%94%E8%AF%A5%E8%A2%AB%E8%BD%AC%E6%8D%A2%E3%80%828%E4%B8%AA%E9%80%9A%E9%81%93%E5%B1%9E%E4%BA%8E%E5%90%8C%E4%B8%80%E7%BB%84%EF%BC%8C%E4%B8%94%E5%9D%87%E9%87%87%E7%94%A8%E7%9B%B8%E5%90%8C%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%B9%E5%BC%8F%E3%80%82%E5%BC%95%E8%84%9A%E5%85%A8%E9%83%A8%E9%85%8D%E7%BD%AE%E4%B8%BA%E6%AD%A3%E7%A1%AE%E7%9A%84Adc%E9%80%9A%E9%81%93%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E5%B0%9D%E8%AF%95%E9%80%9A%E8%BF%87%20Hw%20%E5%92%8C%20BCTU%20%E8%A7%A6%E5%8F%91%20Adc0%EF%BC%8C%E4%BD%86%E6%B2%A1%E6%9C%89%E5%B8%AE%E5%8A%A9%E3%80%82%E6%88%91%E8%BF%98%E5%B0%9D%E8%AF%95%E5%85%B3%E9%97%AD%20Adc1%20%E4%BB%A5%E6%9F%A5%E7%9C%8B%E5%AE%83%E6%98%AF%E5%90%A6%E4%B8%AD%E6%96%AD%E4%BA%86%20Adc0%E3%80%82%E6%9C%80%E5%90%8E%EF%BC%8C%E6%88%91%E5%B0%9D%E8%AF%95%E4%BB%85%E8%A7%A6%E5%8F%91%E4%B8%A4%E4%B8%AA%E6%9C%89%E9%97%AE%E9%A2%98%E7%9A%84%E9%80%9A%E9%81%93%EF%BC%8C%E4%BD%86%E5%AE%83%E4%BB%AC%E4%BB%8D%E7%84%B6%E8%AF%BB%E6%95%B0%E4%B8%BA%200%E3%80%82%3C%2FP%3E%3CP%3E%E7%9F%A5%E9%81%93%E6%98%AF%E4%BB%80%E4%B9%88%E5%8E%9F%E5%9B%A0%E5%AF%BC%E8%87%B4%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%E5%90%97%EF%BC%9F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1905189%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E4%B8%80%E4%BA%9B%20Adc%20%E9%80%9A%E9%81%93%E6%80%BB%E6%98%AF%E8%BF%94%E5%9B%9E%200%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1905189%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%B8%8D%E3%80%82%E8%BF%99%E5%8F%AF%E8%83%BD%E6%98%AF%E7%94%B1%20RTD%20%E7%9A%84%E9%94%99%E8%AF%AF%E5%BC%95%E8%B5%B7%E7%9A%84%EF%BC%9A%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K344-ADC-HAS-ADC-INTERLEAVE-problem%2Fm-p%2F1548855%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K344-ADC-HAS-ADC-INTERLEAVE-problem%2Fmp%2F1548855%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E