STM32L431KBU TEMEPRATURE SENSOR
Hello everyone, we want to read the value from the temperature sensor with ADC using the stm32f431kbu6 microprocessor. We use the code mentioned below.
#define TS_CAL_1 (*((uint16_t*)0x1FFF75A8)
#define TS_CAL_2 (*((uint16_t*)0x1FFF75CA)
float mcuTempCalculate (uint16_t tempADCval, uint16_t VrefIntADCval)
{
float temperature = 0;
temperature=(((130.0f-30.0f)/(TS_CAL_2-TS_CAL_1))*(3.3/3.0 * tempADCval - TS_CAL_1))+30.0f;
return temperature;
}
However, we read the temperature value as 6-8V. temADCval value is 863. Where might the problem be? Can you help?
