Keep data

SD card storage

Field logs for the customer. Design the slot for hot-plug.

Keep data SD card ESP32 family

Official path: examples/storage/sd_card

01 Overview

SDMMC or SPI mode.

  • Use when: long logs, offline export.
  • Skip when: a few config bytes (NVS).

02 Hardware

  • Slot, data lines, 3.3V. SPI uses fewer pins, slower.
  • Hot-plug needs a well-behaved rail.

03 Software flow

1. Mount FAT.

2. Write and sync.

3. Unmount before removal. Tell the user when a write is in flight.

04 Core points

  • Card quality varies; fixture-test lots.
  • Custom work: log format, slot layout, export flow.

中文

掉电还在

SD 卡存储

现场日志、导出给客户。卡槽和电源要按热插拔想。

掉电还在 SD 卡 ESP32 family

官方路径: examples/storage/sd_card

01 项目概述

SDMMC 或 SPI 模式读写 SD。

  • 适用: 长时间日志、离线导出。
  • 不适用: 只要几个配置字节(用 NVS)。

02 项目硬件描述

  • 卡槽、数据线、3.3V 供电。SPI 模式脚更少但更慢。
  • 热插拔要防抖动电源。

03 项目软件流程描述

1. 挂载 FAT。

2. 写文件,注意同步。

3. 拔卡前卸载。产品要提示「正在写」。

04 项目核心点

  • 卡质量参差,工装要抽测。
  • 可定制: 日志格式、卡槽布局、导出流程。