2396197_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2396197_en-US

2396197_en-US

S32K312 temperature sensor inaccurate reading

Hello NXP Team,

I am working on the S32K312​ internal temperature sensor and need help with incorrect temperature readings.

I have reviewed similar threads and confirmed the basic configurations, but the ADC results do not reflect the ambient temperature.

What I have done so far:

(1) TEMPSENSE clock enabled​-Screenshot attached 

SunLucas_0-1784265425989.png

(2)ADC configuration

  • ADC instance: ADC0

  • Channel: Temperature Sensor (TEMPSENSE)

  • Trigger mode: Software trigger

SunLucas_1-1784265855587.png

(3)Measurement routine

  • Periodically start ADC conversion

  • Wait for conversion complete flag

  • Read ADC data register

SunLucas_3-1784266057594.png

(4)Result

However, the converted temperature value does not match the actual ambient temperature.

SunLucas_4-1784266156349.png

Any guidance, clarification, or reference code for the S32K312 temperature sensor would be greatly appreciated.
 
Thanks in advance for your support!
 
Best regards,

Re: S32K312 temperature sensor inaccurate reading

Hi@SunLucas

The temperature channel requires a relatively long sampling time, with a minimum of 1.2 microseconds.

Therefore, please check the sampling time settings.

Re: S32K312 temperature sensor inaccurate reading

I further switched the ADC voltage reference to 0x50, but the issue persists:

  1. The temperature readings deviate significantly from the ambient temperature (28°C).

  2. Temperature data retrieved via the API exhibits severe fluctuations, as shown in the attached plot.

SunLucas_2-1784276930276.png


SunLucas_1-1784276815975.png



Re: S32K312 temperature sensor inaccurate reading

Hi@SunLucas

Then you should set TempSense voltage supply to: 5V * 16 = 0x50

Re: S32K312 temperature sensor inaccurate reading

The TempSense voltage supply is configured as 0x58, hardware's VDD_HV_A supply voltage is 5V

SunLucas_1-1784274126228.png


Re: S32K312 temperature sensor inaccurate reading

Hi@SunLucas

Please check the "TempSense Voltage Supply" and tell me what your current hardware's VDD_HV_A supply voltage is.

Tags (1)
No ratings
Version history
Last update:
yesterday
Updated by: