Internal Temperature sensor

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

Internal Temperature sensor

ソリューションへジャンプ
5,772件の閲覧回数
Venu_M
Contributor III

Hello NXP team,

How to read MCU internal temperature sensor value through ADC.

Venukumar_0-1689356014544.png


How to configure this pin in the configuration.
which pin need to configured for this.

Adc_Sar_Ip_TempSenseEnable();
Adc_Sar_Ip_GetConvData();
Adc_Sar_Ip_TempSenseCalculateTemp();

These Api i used for accessing the values from the register.

Venukumar_1-1689356327235.png


After this its Tca1 its going to the vector catch.

Venukumar_2-1689356605124.png


its going to the trap_bus_isr and went to vector catch.

Can you tell me the flow or procedure how to access the temperature value (ETS) from MCU chip.




0 件の賞賛
返信
1 解決策
5,558件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Venukumar

Your understanding is correct, but you only need to use one of them.
Also you don't have to call Adc_Sar_Ip_TempSenseEnable/Disable every time.

Senlent_0-1690163630552.png

元の投稿で解決策を見る

0 件の賞賛
返信
11 返答(返信)
5,678件の閲覧回数
Venu_M
Contributor III
Hello Senlent,
Thanks for given this link. I referred this post already.
I'm using 2.0.0 RTD package version.
In a configuration what need to be configure related to tempsensor in the ADC Unit in EB tool.
I configured the Tempsense channel in the ADC unit and for this no port pins available(junction temperature) I'm getting the value also for this channel.
If i use the same flow what you posted in the community, I'm getting high temperature value.


0 件の賞賛
返信
5,671件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Venukumar

I am not familiar with EB, if you have questions about EB, please remember to create a new case and add keywords such as EB or MCAL.

 

Here are the test results I did based on the demo in the link

Senlent_2-1689838452813.png

What you need to pay attention to is the reference voltage of your ADC module

The Vref I set here is 3.3V, which is 53

5,660件の閲覧回数
Venu_M
Contributor III

Hi@Senlent 

I'm also using the same 3.3 Vref 

Venukumar_0-1689848905932.png

But for me Tempsense variable not updating correctly but in data variable its updating.
In Tempsense variable always giving a value as (Tca0).

I posted a new question with a subject name as EB_MCAL.

And after getting the tempsense value how to covert that into degrees.

0 件の賞賛
返信
5,632件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Venukumar

thank you for understanding.
As shown in the test result I provided above, the ADC sampling value is 1402, the converted result is 2947, and the actual temperature is 29.47℃。

5,624件の閲覧回数
Venu_M
Contributor III

Hi@Senlent

I too geeting the tempesense value.


How you are converting that into temperature.(your getting 2947 in millivolt its 2.3748mV how you calculated into temperature 29.47degree C.)
In reference manual not specified the formula.


I know the formula like (mV - 0.5)*100 for temperature calculation.

Is there any formula is there to convert?

Venukumar_0-1689914896058.png

By using the formula the junction temperature calculated like this mentioned.

0 件の賞賛
返信
5,614件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Venukumar

You can check the routine provided by me, you will find that the function of calculating temperature has been given in the driver provided by RTD

Senlent_0-1689917918771.png

This function is consistent with the calculation formula given in the data sheet

4,019件の閲覧回数
jack-joker
Contributor II
Could You send it to help you with your journey?thanks
0 件の賞賛
返信
3,959件の閲覧回数
jack-joker
Contributor II

I missed your reply because I didn't read the mail, I'm sorry for that! Now I've solved this problem, but a new problem has arisen about CAN communication. How do I send you an email?

0 件の賞賛
返信
5,599件の閲覧回数
Venu_M
Contributor III

Hi@Senlent

I used that Api().

Venukumar_0-1689943568847.png

 

Adc_Sar_Ip_TempSenseGetTemp() this Api is given  value as 616 , I don't know how to get this into temperature.
Adc_Sar_Ip_TempSenseCalculateTemp() this Api given  value as 569.

Not able to get the temperature in the degrees.

Venukumar_0-1689939315077.png
I can use one Api among these 3 Api's, I can get the temperature correct.
For the first one we need ADC sampling data, For the second api no need of any data directly we can call the api and get the temp through the sensor correct?
Third one also we can able to use?

Can you tell me the flow of Api which one i need to call first.

Adc_Sar_Ip_TempSenseEnable(AdcHwUnit_0);
data1 = Adc_Sar_Ip_GetConvData(AdcHwUnit_0, ADC_SAR_USED_CH);
Tempsense =  Adc_Sar_Ip_TempSenseCalculateTemp(AdcHwUnit_0,0,data1);
Adc_Sar_Ip_TempSenseGetTemp(AdcHwUnit_0,0,&temperature);
Adc_Sar_Ip_TempSenseDisable(AdcHwUnit_0);

Like this i called the Api's , whether it is correct?


I'm asking lots of question sorry for that !!!
0 件の賞賛
返信
5,559件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Venukumar

Your understanding is correct, but you only need to use one of them.
Also you don't have to call Adc_Sar_Ip_TempSenseEnable/Disable every time.

Senlent_0-1690163630552.png

0 件の賞賛
返信