Ghost on the Bus

SPI MISO Always High Debug

Symptom

Both reads print 0xFF. The scope shows both reads on SCK and MOSI. MISO never leaves high. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: U1, an STM32F4, wired to U2, an IMU: PA4 to nCS with R1 10k pulled up to 3V3, PA5 to SCLK, PA6 from SDO, PA7 to SDI, and USART1 TX on PA9 to J1, a serial console

Pass condition

USART1 prints the sensor's two values, one line each: WHO_AM_I:0x<id> then PWR_MGMT_1:0x<value>.

Expected output on this bench: two register reads on the bus, F5 00 answered FF 68 and EB 00 answered FF 40, and the console lines WHO_AM_I colon 0x68 and PWR_MGMT_1 colon 0x40

Notes

The bench runs the IMU on SPI1 from power-up: mode 0, up to 1 MHz. A read sends 0x80 | address. The value comes back on the next byte.

Related challenges

Loading the interactive arena.