I’d like to know is there any built-in Temperature Sensor inside RAK811 module. Suppose STM32 MCU should have internal Temperature Sensor at ADC_IN16 channel. Can I have example code to get access to this sensor?
As RAK811 is based on STM32 MCU, yes there is internal temp senor. But for using you have to write your own code and calibration procedure. You can read more here :
I do the following steps but it doesn’t work!
the “SET_BIT(ADC->CCR,ADC_CCR_TSVREFE)” not effect!!
some part of my code:
#define TEMP110_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FF8007E))
#define TEMP30_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FF8007A))
m=((float)(110-30))/(t110 - t30);
temp= (m * (ADC- t30)) +30;