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 ?
Solved! Go to Solution.
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).
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).
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
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 |
59 | 74 |
50 | 59 |
55 | 78 |
Is there something wrong with our calculation ?
Is it possible that some kernel configuration breaks TRISTR hardware calibration ?
Thank you for your time
Gerome
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.
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
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.
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
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