Skip to content

HydraFW binary MMC mode guide

Benjamin Vernoux edited this page Mar 24, 2023 · 9 revisions

HydraFW binary MMC mode guide

This mode is specific to MMC/eMMC (and it does not support SDCard).

  • For SDCard support, see SDIO

This mode allows to control MMC

  • MMC pins: CLK=PC12, CMD=PD2, D0=PC8

For more details see https://github.com/hydrabus/hydrafw/wiki/HydraFW-MMC-guide

This guide is updated towards firmware release HydraFW v0.11 and later

Commands

Once the MMC mode has been selected, the following commands are available :

  • 0b00000000 Return to main mode. Returns BBIO1
  • 0b00000001 Mode identification. Returns MMC1
  • 0b00000010 Read CID
  • 0b00000011 Read CSD
  • 0b00000100 Read block
  • 0b00000101 Write block
  • 0b00000110 Read EXT_CSD

Command details

Read CID (0b00000010)

This command will reply with 16 bytes containing the card CID.

Read CSD (0b00000011)

This command will reply with 16 bytes containing the card CSD.

Read block (0b00000100)

This command will read the next 4 bytes as the block number (little-endian). The command will reply 0x01 followed by the resulting block data (512 bytes). It will reply 0x00 in case of error.

Write block (0b00000101)

This command will read the next 4 bytes as the block number (little-endian), then 512 bytes of data. The command will reply 0x01 if successful, 0x00 otherwise.

Read EXT_CSD (0b00000110)

The command will reply 0x01 followed by 512 bytes of EXT_CSD register value if successful, 0x00 otherwise.

How to Flash/Use HydraFW

How to Build/Flash/Use HydraFW

Developer Getting-Started with HydraBus and STM32CubeIDE

Hardware

Firmware (hydrafw) performances

Firmware (hydrafw) Application guides

Firmware (hydrafw) guides

How to Help

Clone this wiki locally