ACD example to read voltage

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ACD example to read voltage

ソリューションへジャンプ
1,090件の閲覧回数
jetty_1012
Contributor II

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

 

Thanks.

0 件の賞賛
返信
1 解決策
1,054件の閲覧回数
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,067件の閲覧回数
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,055件の閲覧回数
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,039件の閲覧回数
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,024件の閲覧回数
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 件の賞賛
返信