STM32U535: Delay needed after ADC1 initialization before starting with ADC_CR_ADSTART?
Hello,
here the exit of my (extended)initialization prodecure for ADC of STM32U535 running at 3.3v and 160 Mhz. Before setting ADC_CR_ADSTART, without the small delay or with the delay in line 14 and the limit for i smaller "6" like here "5" in the code, ADC_CR_ADSTART stays high and the programm keeps in the while (ADC1->CR & ADC_CR_ADSTART) loop line16/17. __DMB() is not replacement for the delay.
Is the needed delay some artefact of my setup or some requirement that I do not find/oversee in RM0456?
ADC1->CR |= ADC_CR_ADCAL; /*8*/
while (ADC1->CR & ADC_CR_ADCAL) {
__NOP();
}
__DMB();
ADC1->CR &= ~ADC_CR_ADCALLIN;
__DMB();
const uint8_t channel = 19U;
AdcSetRegularSequence(ADC1, 1U, &channel);
ADC1->CR |= ADC_CR_ADEN;
while (!(ADC1->ISR & ADC_ISR_ADRDY)) {
__NOP();
}
for (volatile int i = 0; i < 5; i++) {}
ADC1->CR |= ADC_CR_ADSTART;
while (ADC1->CR & ADC_CR_ADSTART) {
__NOP();
