Roll Call

SPI Flash JEDEC ID Read Exercise

Task

U2 is a flash chip the bench plays on SPI1. Once after reset, read and print U2's ID. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: U1 STM32F4 wired to U2, a flash chip: PA4 to CS with R1 pulling it up to +3V3, PA5 to CLK, PA6 from DO, PA7 to DI, and PA9 carrying the USART1 report to TP1, a serial monitor

Pass condition

The terminal must print ID: and U2's three ID bytes in hex, two digits each.

Expected output: the terminal prints ID: followed by U2's three ID bytes in hex

Notes

Flash datasheet: read ID is 0x9F. U2 answers with maker, type and size. Your program is built and run at -O0, then at -O2. Both must pass.

Related challenges

Loading the interactive arena.