STM32F7 reads 4095 on all ADCs for the first 2.3 seconds after power on but not after reset
Hi, I'm using STM32F767ZG on a development board (Fusion for STM32 V8 by Mikroelectronica).
My problem is that all ADCs will read 4095 for the first 2.3 seconds after power on. If I perform a reset on the uC, they read correctly from the first read. Also, if I power down, hold the reset button, then power on and wait ~3 second and then release the reset button, they will read fine immediately.
I suspect that the analog reference voltage on the uC on the board has an issue stabilizing quick enough, but 2.3 seconds seems waaaay too big.
Sample code:
ADC_ChannelConfTypeDef sConfig = {0};
hadc1.Instance = ADC1;
hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2;
hadc1.Init.Resolution = ADC_RESOLUTION_12B;
hadc1.Init.ScanConvMode = DISABLE;
hadc1.Init.ContinuousConvMode = ENABLE;
hadc1.Init.DiscontinuousConvMode = DISABLE;
hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
hadc1.Init.NbrOfConversion = 1;
hadc1.Init.DMAContinuousRequests = DISABLE;
hadc1.Init.EOCSelection = ADC_EOC_SEQ_CONV;
HAL_ADC_Init(&hadc1);
sConfig.Channel = ADC_CHANNEL_TEMPSENSOR;
sConfig.Rank = 1;
sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
HAL_ADC_ConfigChannel(&hadc1, &sConfig);
HAL_ADC_Start(&hadc1);
HAL_ADC_PollForConversion(&hadc1, HAL_MAX_DELAY);
voltage_adc = HAL_ADC_GetValue(&hadc1); // Always 4095 for the first 2.3 seconds
