2025-06-27 3:03 AM
Hi , all
I am currently working on a project using the STSPIN32G4 together with the STM32 Motor Control SDK (MCSDK). I would like to add the internal Temperature Sensor to monitor the MCU temperature.
In STM32CubeMX, I have already enabled both the Temperature Sensor and VREFINT channels on ADC1, and generated the initialization code. Then, I configured the Temperature Sensor and VREFINT using the RDivider_Handle_t structure, and used the related APIs to read the ADC values.
However, no matter whether I read the Temperature Sensor or VREFINT, the ADC values are always very close to zero, as if the sampling is not working correctly or is misconfigured.
My questions are:
Within the MCSDK framework, is it possible to directly use RDivider_Handle_t to read the Temperature Sensor and VREFINT channels?
If not, what is the correct way to configure and acquire the ADC raw values for these internal channels?
Are there any additional calibrations or specific initialization procedures required?
Thank you!