cmd52命令发送 mmc_SD/SDIO/MMC Driver

Usage with SDIO cards¶

Initialization an probing process is the same as with SD memory cards. Only data transfer commands differ in SDIO mode.

During probing and card initialization (done by sdmmc_card_init()), the driver only configures the following registers of the IO card:

The IO portion of the card is reset by setting RES bit in “I/O Abort” (0x06) register.

If 4-line mode is enalbed in host and slot configuration, driver attempts to set “Bus width” field in “Bus Interface Control” (0x07) register. If that succeeds (which means that slave supports 4-line mode), host is also switched to 4-line mode.

If high-speed mode is enabled in host configuration, SHS bit is set in “High Speed” (0x13) register.

In particular, the driver does not set any of the bits in I/O Enable, Int Enable registers, IO block sizes, etc. Applications can set these by calling sdmmc_io_write_byte().

For card configuration and data transfer, use one of the following functions:

sdmmc_io_read_byte(), sdmmc_io_write_byte() — read and write single byte using IO_RW_DIRECT (CMD52).

sdmmc_io_read_bytes(), sdmmc_io_write_bytes() — read and write multiple bytes using IO_RW_EXTENDED (CMD53), in byte mode.

sdmmc_io_read_blocks(), sdmmc_io_write_blocks() — read and write blocks of data using IO_RW_EXTENDED (CMD53), in block mode.

SDIO interrupts can be enabled by the application using sdmmc_io_enable_int() function. When using SDIO in 1-line mode, D1 line also needs to be connected to use SDIO interrupts.

The application can wait for SDIO interrupt to occur using sdmmc_io_wait_int().

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值