cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Temperature Function With I/O on PC6

Rogers.Gary
Senior II
Posted on May 17, 2017 at 07:27

Hello:

Question 1:

A question that I cannot find an answer for. If I'm using PC6 (STM32F4) as a GPIO already, can I still configure and use the internal temperature sensor on ADC16?

Question 2:

Using the calibration constants stored in the device, and adding some extra calibration points if required, how accurate is the temperature sensor at ranges of -40C to +70C ?

Thanks...

Note: this post was migrated and contained many threaded conversations, some content may be missing.
11 REPLIES 11
Posted on May 17, 2017 at 18:39

The interal temperature of a 'F40x running at full throttle can easily be some 20-30 degC above the ambient. The difference is dependent on the particular core workload, particular mix of peripherals running and their particular setup and clocking, on supply voltage, on outputs loading, on cooling through the leads, on heating from surrounding chips, on the heating history and elapsed time, and possibly a gazillion of other influences.

So unless you can leave your mcu in some of the low-power modes for a significantly long time to leave it cool down close to the ambient, I personally see your target as hopeless.

JW

Posted on May 18, 2017 at 08:00

As Jan said, the core die temperature will significantly (and unpredictably) differ from the ambient temperature.

A simple p-n junction (forward voltage of general-purpose diode), connected to an ADC input, would work the same way.

Perhaps you can even use the formula for the internal sensor with some tweaking.

Such setups have been in use for a long time, with accuracies better than +-1°C.