Stonewall

STM32 Stops Responding After EXTI Debug

Symptom

Each ? from the host gets COUNT:0 until the feed roller first turns. From that edge on, no ? is ever answered. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: channel A of the feed roller's encoder drives PA1 of U1, an STM32F4, whose USART1 transmit and receive lines on PA9 and PA10 run to the host on J1

Pass condition

Every ? gets one line, COUNT:<n>, where n counts PA1's edges so far. Rising and falling both count. The count stays in EXTI1's interrupt, as in the starter.

Expected output for the first-turn case: the host sends four question marks at 1, 2, 6 and 8 ms while PA1 rises at 3, falls at 4, rises at 5 and falls at 7 ms, and the replies are COUNT:0, COUNT:0, COUNT:3 and COUNT:4

Notes

The bench turns the roller and sends each ? on USART1 RX, for as long as the board runs. The encoder's edges are clean and at least 1 ms apart.

Related challenges

Loading the interactive arena.