Writing a SD Card driver in Rust
summary
Rust code implements an SPI SD Card driver that uses embedded-hal traits to send the actual six‑byte command frames, handles responses and CRC checks, and initializes cards over SPI; it reads/writes 512‑byte blocks via a blocking block‑device API and issues command 17 and 18 for reads, respecting the weird timing requirement of 74 clock cycles. A FAT implementation maps blocks to files, a few demos run, tests are slow, occasional corruption reports make it unsuitable for production without more testing.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:26What is an SD card
- 5:17Systems engineering
- 8:04Block devices
- 14:12Sending commands
- 17:10SPI bus API
- 18:55FAT file system
- 25:05Open Directory
related talks
31mthrowing your project in the bin and starting again
27mUsing Rust in the binder driver
31mGetting Something for Nothing
55mComprehensive Testing of Embedded Software
39mFrom C to Rust: Bringing Rust Abstractions to Embedded Linux
39mFrom C to Rust: Bringing Rust Abstractions to Embedded Linux
47mWriting a Nintendo 64 emulator in Rust
46mIntroduction to Embedded Rust
