Dtynin
DIIDevHeads IoT Integration Server
•Created by Sterling on 8/23/2024 in #firmware-and-baremetal
What is the purpose of HAL_ADC_PollForConversion in STM32 HAL ADC code?
@Sterling the
HAL_ADC_PollForConversion
function makes sure the ADC conversion is finished before you grab the value. Without it, you might get an incomplete reading, which can lead to errors. Even though your readings seem okay without it, that's likely because of the delay in your loop. Using PollForConversion
just guarantees you're always getting accurate results.2 replies