As Found

Read Modify Write Register Exercise

Task

Blink the LED on PA5 three times, then leave it off: high, low, high, low, high, low Other port A pins are already set up for other circuits, so change only PA5. The registers are on the Datasheet tab, under GPIOA.

Circuit

Block diagram: U1 STM32F4 pin PA5 drives R1 330R into D1 LED to ground, with a TP1 logic analyzer probe on the PA5 net; the other fifteen port A pins go to other circuits, set up by the bootloader

Pass condition

PA5 goes high, then low, three times, and ends low. Nothing else on port A may change. Timing is not graded.

Expected output in the power-hold case: PA7 held high by the bootloader for the whole run and never moving, and PA5 going high, then low, three times

Notes

The bootloader runs before main, and each test is a board it set up differently.

Related challenges

In interview questions

Loading the interactive arena.