2024-11-06 10:26 PM - last edited on 2024-11-07 12:15 AM by Peter BENSCH
Hello, I am using ADC and DAC for sensing in my device, and I am using the STM32F405RGT6. I want to perform calibration, but I cannot use
"HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);"
. I tried using this code:
SET_BIT(ADC1->CR2, ADC_CR2_CAL);
(READ_BIT(ADC1->CR2, ADC_CR2_CAL) != 0);
But it resulted in an error because I don't fully understand it. Is there a solution for this? I just want to perform calibration. If I'm using a potentiometer, do I need to use a jumper?
I also want to ask why calibration is important, and what happens if calibration is not performed? Please help me.
2024-11-08 01:51 AM
I skimmed over the ADC description, but if I remember correctly, the ADCs of the F0x MCUs had the same threshold feature.
Anyway, this threshold is an "internal" register, comparing the conversion result against some value you define, and create a binary yes/no output. The same accuracy issues apply, since it relates to the very same device.
Calibration involves by definition a reference environment, and determining the deviations.
In the simplest case, this could be a calibrated multimeter.
Many companies (like mine) pay a not insignificant sum for an annual calibration of their measuring equipment. Regulations in certain industry sectors require this