Flight Recorder

You're building the data-logging module for a drone flight controller. A mock SPI sensor is connected to SPI1 and its chip-select is wired to PA4 (active-low). The sensor uses standard SPI register-read convention: send the register address with the read bit set (address | 0x80), then clock in the response with a dummy byte.

Your job: read the sensor's status register (address 0x75), then format and print the result over UART1.

Output format (the value printed is whatever the sensor returns): SENSOR: 0x<id>

The starter code provides UART helper functions (init, putc, puts, print_hex) and all register definitions. You need to enable the peripheral clocks, configure SPI1 as master, manage chip-select, perform the SPI transaction, and print the result.

Loading the interactive arena.