概述
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().
最后
以上就是老实草丛为你收集整理的cmd52命令发送 mmc_SD/SDIO/MMC Driver的全部内容,希望文章能够帮你解决cmd52命令发送 mmc_SD/SDIO/MMC Driver所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复