2016-03-01 06:14 AM
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''...
2016-03-01 08:55 AM
Hi ColdWeather,
Great to hear that you fixed the issue you faced.But I would like to know which constants are wrong in the appendix of RM0091?-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2016-03-01 11:13 AM
All constants are correct, but in the appendix there are additional defines of 300 and 330 that have impact on the resulting value. As I later understood, the appendix gave an example of the code specially written for F0 Discovery where the MCU was supplied by 3.0V while the calibration values were fixed for 3.3V. Unfortunately, there is no notice in the RM about this, and applying the code example ''as is'' to a system with the 3.3V supply leads to a wrong result.