Wait for It
STM32 Data Ready Pin Exercise
Task
A sensor is like a toaster. It takes its time, and nobody knows in advance when it will be done. When a reading is ready, it raises a wire called the data-ready line, like toast popping up. The chip watches that wire. On this board the line is PA0, and the LED on PA5 shows that the chip has seen it.
Make the LED follow the line, like this: PA0 low: LED off. PA0 rises: LED on within 1 ms, and on for good. PA0 rises at most once, at a moment you cannot predict. The registers are on the Datasheet tab, under GPIOA.
Circuit
Pass condition
PA5 rises once, within 1 ms of PA0, and stays high. If PA0 never rises, PA5 never moves.
Notes
PA0 is already an input when the program starts, so it needs no setup.