AnsweredAssumed Answered

STM32F051R8T6 and its temperature sensor - wrong results! - SOLVED

Question asked by ColdWeather on Mar 1, 2016
Latest reply on Mar 1, 2016 by ColdWeather
Hello!

Testing the MCU on F0 Discovery I read out the internal temperature, converted the ADC value by the code example (using the calibration constants)  in the appendix A.7.16 of the RM Rev. 6 and obtained quite realistic values and behavour (heating the MCU up) of about room temperature.

After that I flashed the binary to some user board with the same MCU type, and obtained the temperatures of about -13C! Both MCUs have the Revision B, the only difference is, the F0 Discovery MCU has a string GH22N while the user board MCU - GH22Q. The next step I made, I applied the equation from the chapter 13.9, Page 234, - and look! - the temperature got back to its realistic range! Visa versa, flashing the new code into F0 Discovery I obtained something about +60C.

In the actual Errata to F051 I found nothing about this issue. The questions are:

1. How can I distinguish the MCUs in my code having the same revision of them to apply different equations to convert the temperature?

2. What conversion equation is correct: from the appendix A.7.16 or chapter 13.9?

Best regards.

 

P.S. SOLVED: the MCU supply on F0 Discovery is 3.0V, on the user board - 3.3V. The appendix in the RM gives the equation actually for F0 Discovery but saying nothing(!) about this special case. Only in the DS to F05x is mentioned, the calibration constants are obtained at 3.3V. Thus, the equation in the chapter 13.9 should be commented like "watch 3.3V, recompute for other voltages"...

Outcomes