Doorbell
A button is connected to PA0. Use an EXTI interrupt to mirror the button state to PA5, just like Challenge 03 but interrupt-driven instead of polling.
Your firmware should:
- Configure PA0 as input, PA5 as output
- Configure EXTI0 for both rising and falling edge on PA0
- Enable EXTI0 in NVIC (IRQ 6)
- In EXTI0_IRQHandler: clear the pending bit, read PA0 (IDR),
and mirror its state to PA5 using BSRR
The main loop should just spin. Let the ISR do all the work.