Hello NXP team,
I was connected with NXP Team member SENLENT. He said create a new question with EB as a subject name. Can you share the info with respect to the EB tool.
I tried with this post https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K3-Temperature-Sensor-S32-DS-V3-5-RTD-2-...
I am getting the value for this on data variable by using Adc_StartGroupConversion () instead of using Adc_Sar_Ip_GetConvData().
For tempsense variable is not updating correctly always its giving 6733(Tca0) value in Tempsense variable so its giving an result as high temperature.
How to read MCU internal temperature sensor value through ADC.
How to configure this pin in the EB_configuration.
which pin need to configured for this.
After this its Tca1 its going to the vector catch.
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 by using EB tool.
Hi Venukumar,
Follow RM:
To enable Tempsense's features, you need to enable these parameters in EB:
To Tempsense output is input of ADC, you need to enable:
Follow RM, to convert from voltage to temperature:
In this expression, TCA0, TCA1, TCA2 are read-only and normally not change(or change just a little bit) and they have value:
So, in your case TCA0 is correct.
I encountered the issue that temperature couldn't convert correctly for the package RTM201 through the function Adc_TempSenseCalculateTemp(), but this issue fixed in the latest version RTM 300_P07 or fixed early. So, if you're using old version, please upgrade it.
For clock, please don't forget to enable this:
Best regards,
Nhi
Hi Nhi,
I configured like, what you mentioned.
I'm able to get the value but how i will get the value in a degree based(like 35deg or 56deg)
AdcReadGroupResult_1[8] is the Tempsense channe output(1239).
here i got the value as 3517 by using this Api --> Adc_Sar_Ip_TempSenseGetTemp
Can you please tell me how to convert (api)this value into a degree based.
Hi @Venu_M ,
The return value of the function Adc_Sar_Ip_TempSenseCalculateTemp() is in fixed-point format as description below:
Some expressions used to calculate:
For example:
Note:
- Conversion resolution
- Reference Voltage, in my case, Vref is 5V.
Seem that there is difference result between expression in RM and driver. I'll contact to SW team and get feedback from them.
Best regards,
Nhi
Hi @Venu_M ,
All data in this thread that I said as example, they captured from the example that I was attached and sent to you, like this:
Best regards,
Nhi
Hi Nhi,
Can you please check with this RTD SW32K3_RTD_4.4_2.0.0 .
To check the MCU temperature.
Hi @Venu_M ,
This is result I got from ver 200.
Please put a breakpoint as above image, because I just change channel to ADC for temp sense base on the RTD's example that is available in the package.
Hi Nhi,
Can I use this RTD package for MCU Internal Temperature?
Currently we are using SW32K3_RTD_4.4_2.0.0.
Our MCU is S32K342.
Hi @Venu_M ,
This should be the best package for known issues were fixed. In this package, have no the example for S32K342 so you need to import this project from the previous releases.
Best regards,
Nhi
Hi Nhi,
I'm getting the value as 1239 from adcgroupresult for the tempsensor channel.
1239*(3.3/4095)=0.9984
So, if i calculate by using this formula, the temperature value will be 200+degree.
How to do this .
Hi @Venu_M ,
Did you try to run the example that I attached to previous comment? In my example, Vref = 5 not 3.3V. You can refer to read me to see board used. Because as far as I know, Changing board make default Vref change. You also need to upgrade to the latest version also.
Best regards,
Nhi
Hi @Venu_M ,
From my point of view, your problem can come from setting parameters to measure temperature is incorrect. As I said in the previous comment, please take care these parameters:
Best regards,
Nhi
Hi Nhi,
Reference voltage 3.3v
Conversion resolution 12bit
Parameters is correct only. But while reading the temperature value giving wrong.
Hi @Venu_M ,
Because Vref value depends on the board. So, my suggestion that you can use the example that was attached in the package, then you can ensure that setting for ADC is correct, then change one of channel that measured to temperature channel.
For example:
I used this example:
Follow to
Vref in my case: 5V.
I changed channel 1 to temperature channel as below:
Result is as in previous comment.
Best regards,
Nhi
Hi Nhi,
I used the same configuration like 5V as reference like you mentioned.
I got the value from ADC is 1059 (last value for the temperature sensor) its varying from 1059 to 1887 like that and its reducing in the low level also,
This Api I'm using.
I'm confusing for this temperature channel value updating.
Can you share the whole process, I did whatever you mentioned but need a clarity for me.
You mentioned like some RTD versions. Can you share the link for download as well?
Hi @Venu_M ,
I attached an example that I just changed a little bit based on available example that attached in the package. you can try it.
You can read readme to know more information about board used. I'm using the package SW32K3_RTD_R21-11_3.0.0_P07. You can find it at the link:
https://nxp.flexnetoperations.com/control/frse/product?child_plneID=830617
Best regards,
Nhi
Hi @Venu_M ,
You can find the release SW32K3_S32M27x_RTD_R21-11_4.0.0
at the link:
https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=3790868
Best regards,
Nhi
Is the value of Temp converted to decimal the temperature actually captured by the temperature sensor?
Hi @Venu_M ,
SW team confirm that they didn't handle tolerance well. The ticket RTD-24483 raised to improve this. It'll be integrated in the release RTM 400.
Best regards,
Nhi