ACD example to read voltage

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

ACD example to read voltage

跳至解决方案
1,139 次查看
jetty_1012
Contributor II

I'm using S32K312. I need an ACD example to read voltage.

 

Thanks.

0 项奖励
回复
1 解答
1,103 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Have you test Adc_Sar_Bctu_Ip_example_S32K312 in S32K3 RTD? Which ADC channel do you want to sample? Please select Adc Physical Channel Name in S32CT.

You can also refer to the Example-S32K3 Temperature Sensor S32 DS V3.5 + RTD 2.0.2


Best Regards,
Robin

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,116 次查看
jetty_1012
Contributor II

jetty_1012_0-1691065105819.jpeg

Is Adc_Sar_Ip_GetConvData used for reading ADC?

That was my testing code and I was debugging. The return value of this API was 0. How should I read ADC value correctly?

0 项奖励
回复
1,104 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Have you test Adc_Sar_Bctu_Ip_example_S32K312 in S32K3 RTD? Which ADC channel do you want to sample? Please select Adc Physical Channel Name in S32CT.

You can also refer to the Example-S32K3 Temperature Sensor S32 DS V3.5 + RTD 2.0.2


Best Regards,
Robin

0 项奖励
回复
1,088 次查看
jetty_1012
Contributor II

@Robin_Shen Thanks for you reply.

I referred to the example and just reconfigured it.

jetty_1012_0-1691118727276.jpeg

At first, I had no clue how to set the second parameter of Adc_Sar_Ip_GetConvData, so it only returned 0.

And now I know how to set it based on different channles and I can read specific values from it, but the values I read are usually over 4095.

Precise ADC is 12-bit binary number which is 4095 at max.

Why is it over 4095? Is there any conversion about it?

Thanks.

0 项奖励
回复
1,073 次查看
jetty_1012
Contributor II
Well, I figured it out. There's a Conversion resolution option which was set to 14 before. I change it to 12 and the ADC values are below 4095 now.
0 项奖励
回复