Skip to main content
deep_rune
Associate III
July 6, 2020
Question

How do i check a flag bit inside a conditional statement without using HAL?

  • July 6, 2020
  • 1 reply
  • 575 views

Im using the ADC of an STM32F031K6 without using HAL. As im using discontinuous mode, I need to check the EOC bit to see if each conversion has finished, if yes store the data and start the next conversion. How do I write an 'if' statement that will check the EOC bit inside the ISR register, without using HAL?

This topic has been closed for replies.

1 reply

Mike_ST
Technical Moderator
July 6, 2020

Maybe

if ((ADC1->ISR) & ADC_ISR_EOC) ...

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.