HydraFW binary MMC mode guide - hydrabus/hydrafw GitHub Wiki
HydraFW binary MMC mode guide
This guide is updated towards firmware release HydraFW v0.11 and later
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, D1=PC9, D2=PC10, D3=PC11
For more details see https://github.com/hydrabus/hydrafw/wiki/HydraFW-MMC-guide
Commands
Once the MMC mode has been selected, the following commands are available :
0b00000000
Return to main mode. Returns BBIO10b00000001
Mode identification. ReturnsMMC1
0b00000010
Read CID0b00000011
Read CSD0b00000100
Read block0b00000101
Write block0b00000110
Read EXT_CSD0b1000000x
Configure MMC interface
Command details
0b00000010
)
Read CID (This command will reply with 16 bytes containing the card CID.
0b00000011
)
Read CSD (This command will reply with 16 bytes containing the card CSD.
0b00000100
)
Read block (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.
0b00000101
)
Write block (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.
0b00000110
)
Read EXT_CSD (The command will reply 0x01
followed by 512 bytes of EXT_CSD register value if successful, 0x00
otherwise.
0b1000000x
)
Configure MMC interface (The x
value is used to set the MMC bus width :
0
is 1-bit mode1
is 4-bit mode