-
Notifications
You must be signed in to change notification settings - Fork 207
Description
Nucleo-F756ZG
STM32CubeIDE 1.12.0
I choosed Vrefint channel as model.
When I use conversion mode - EOC flag at the end of single channel conversion for ADC1 for one channel, a program read value once and then does not update anymore.
On screen I highlighted one option: End of conversion selection. When i set EOC flag at the end of single channel conversion it doesn't work. When I change it on EOC flag at the end of all conversions it works ok.
My code:
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_ADC1_Init();
MX_USART3_UART_Init();
HAL_ADC_Start(&hadc1);
while (1)
{
uint32_t value2 = HAL_ADC_GetValue(&hadc1);
float voltage2 = 3.3f * value2 / 4096.0f;
printf("Vref = %lu (%.3f V)\n", value2, voltage2);
//__HAL_ADC_CLEAR_FLAG(&hadc1,ADC_FLAG_EOC); // Optional but does not work
HAL_Delay(250);
}
}
In my opinion: End Of Conversion Selection should not be have impact on continious mode in this case., but even if, it should be work on both options. In manual, there's no information about impact EOC flag on continious mode. We read about continious mode:

I tested it also on 2 channels on ADC1 - IN0 and Vrefint
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
