Solved
STM32H743, ADC_CAL flag is not cleared
Hello.
I try to use ADC with STM32H743II. The problem is that the calibration flag is not reset.
//ADC1
RCC->AHB1ENR |= RCC_AHB1ENR_ADC12EN;
//Exit DEEP Sleep
ADC1->CR = 0;
while(ADC1->CR != 0)
{
ADC1->CR = 0;
};
//Enable LDO
ADC1->CR = ADC_CR_ADVREGEN;
//dump delay, for LDO startup
for(uint32_t i=0; i<0x10000; i++){
__NOP();
};
//Start CAL
ADC1->CR |= ADC_CR_ADCAL;
while(ADC1->CR & ADC_CR_ADCAL){__NOP();}; //Program stop here foreverThis code worked in another project.
If remove the calibration, then the ADC works (I use 2 regular channel with DMA).
Why can't the flag ADC_CR_CAL be reset?