As Found

Read Modify Write Register Exercise

Task

On most boards a small program called a bootloader runs before your code. It has already set up some of port A's pins for other circuits on the board.

Blink the LED on PA5 three times, then leave it off: high, low, high, low, high, low 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

Loading the interactive arena.