iMX8MM temperature sensor gives unconsistent values

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

iMX8MM temperature sensor gives unconsistent values

Jump to solution
777 Views
Gerome
Contributor II

When doing some temperature measurement on our devices, we observed that the temperature given by the imx8mm (`cat /sys/class/thermal/thermal_zone0/temp`) can greatly fluctuate from one device to the other, with the exact same Linux image running.

We also measured the chip temperature with an IR camera and observed that we saw that the difference between imx sensor and the camera can go up to 20°C !

We verified that the imx8mm_thermal driver is included in our kernel.

What can be the reason of these huge temperature differences ?
Maybe there is an issue with the hardware sensor calibration ?

 

 

Labels (2)
1 Solution
23 Views
Gerome
Contributor II

Talking to NXP's support, they said that this bug has been reported before and that this was fixed in the BSP version 5.15.32.

They also said that it should be safe, as a workaround, to read TSCR and TE1 and recalculate the calibrated value (that should be the same as reading TRISRT register).

View solution in original post

0 Kudos
Reply
9 Replies
24 Views
Gerome
Contributor II

Talking to NXP's support, they said that this bug has been reported before and that this was fixed in the BSP version 5.15.32.

They also said that it should be safe, as a workaround, to read TSCR and TE1 and recalculate the calibrated value (that should be the same as reading TRISRT register).

0 Kudos
Reply
21 Views
Gerome
Contributor II
We could not update our BSP so we did not validate the first solution.
But the workaround is working fine for us.

Thanks
0 Kudos
Reply
433 Views
Gerome
Contributor II

Hi @Alejandro_Salas,

 

It seems that burning the fuses when we are locking the device creates this temperature error !

Is there a potential side effect ?

Is it possible that writing some values in the OTP breaks the TMU ?

As a workaround, is it safe to read TSCR in the driver and calculate the calibration ourselves based on TE1 ?

 

Thank you,

Gerome

0 Kudos
Reply
573 Views
Gerome
Contributor II

We made some further investigations and tried to read the value in register TMU_TSCR, which should contain the direct sensor value without 1 point calibration Tsense (?).

And we saw that when we apply the 1 point calibration formula

         Tcalib = Tsense - (TE1 - 25)

<=>   Tcalib = TSCR - (TE1 - 25)

to the value in TSCR, we have completely different value from the TMU_TRITSR register !

On 3 different devices under different conditions, in °C:

Tcalib ( = TSCR - (TE1 - 25) )
TRISTR
5974
5059
5578

 

Is there something wrong with our calculation ?

Is it possible that some kernel configuration breaks TRISTR hardware calibration ?

@Alejandro_Salas 

 

Thank you for your time

Gerome

0 Kudos
Reply
762 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Gerome ,

 

Could you please share the below details:

 

Are you using a custom board or EVK?

What BSP version are you using?

 

Thank you.

Best regards.

 

Salas.

 

 

0 Kudos
Reply
727 Views
Gerome
Contributor II

Hello @Alejandro_Salas ,

I am using a custom board and the manifest imx-5.4.70-2.3.2.xml, it is a bit old but I didn't see any relevant commits on temperature since then.

Thanks

Gerome

0 Kudos
Reply
708 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Gerome ,

 

Could you please check your VDD_SOC, VDD_ANA0_1P8, and VDD_ANA0_0P8 power rails.

 

That power rails impact directly to sensor. You can refer to EVK Schematics.

 

Best regards!

 

Salas.

589 Views
Gerome
Contributor II

Hello @Alejandro_Salas ,

 

We also checked that a 100k resistor is connected to J24, so this is not the issue either.

Can you confirm that the temperature read from the imx8mm thermal driver includes the 1 point calibration (so the DC offset is already subtracted from the value) ? Because the problem we have looks like an offset compensation error.

Do you have any other ideas on what could cause this problem ?

 

Thank you again for your help

Gerome

0 Kudos
Reply
645 Views
Gerome
Contributor II

Hi,

Thanks for your reply!

We just checked, we have VDD_SOC = VDD_ANA0_0P8 = 849mV, and VDD_ANA0_1P8 = 1.78V.
Measures are pretty similar across the different boards (even the ones that have a big thermal sensor difference)

Regards,

Gerome

0 Kudos
Reply