Test the UIF Flag
I am newbie getting lost in the HAL functions/features to use. I use STM32CubeMx to generate the code and use Keil uvision5 for development. I use STM32G071 Nucleo-64 development kit.
I wish to measure a ‘start’ pulse of a proprietary protocol. The pulse, if low for 55 microseconds is considered start pulse.
A port pin has been configured as input. Idea is to poll the line and when a low level is detected, measure the time for how long pulse remains low.
I have used timer 3 with no prescalar, in up counting mode. The ARR count is 3520@64MHz. So far, I have not used any interrupt.
After a low level is detected, the timer is started by
HAL_TIM_Base_Start(&htim3);
As a next step, I wish to poll the UIF flag to check whether the time has elapsed.
I do not know which HAL function or what should I use to check the status of the flag.
Once detected I will need to clear it as well
