Lost in Translation

Settings Never Stick Debug

Symptom

The test jig posts a threshold of 3000, but the board answers THRESHOLD? with THRESHOLD:2048, the factory value. Every setting does the same. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: J1, the test jig, is wired to U1, an STM32F4, twice: over SWD on PA13 and PA14, through which it writes the settings into the mailbox at 0x2000F000 in U1's RAM, and over USART1 on PA9 and PA10, on which it sends its queries and reads the answers

Pass condition

Each setting query gets NAME:<value>, with the value the jig posted. DEFAULTS? answers the factory values.

The shape of the expected exchange: the jig sends one of five setting queries, CAL, INTERVAL, MODE, CHANNEL or THRESHOLD followed by a question mark, and the board answers the name, a colon and the value the jig posted; six such queries come 5 ms apart, then DEFAULTS? is answered DEFAULTS:0,1000,0,0,2048, the factory values

Notes

The jig posts the settings, sets READY, clears the mailbox 2 ms later, then queries over USART1 for as long as the board runs.

Related challenges

Loading the interactive arena.