完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
最近在做SD卡,但不是用原子哥的SPI模式,用SDIO模式,但不知道SDIO指令集,数据手册上只有寥寥几个指令,网上查了许久没有结果。望哪位兄弟给一份指令集。qq 741060785
谢谢了! |
|
相关推荐
4个回答
|
|
我也要
|
|
|
|
#define SD_CMD_GO_IDLE_STATE ((uint8_t)0)
#define SD_CMD_SEND_OP_COND ((uint8_t)1) #define SD_CMD_ALL_SEND_CID ((uint8_t)2) #define SD_CMD_SET_REL_ADDR ((uint8_t)3) /*!< SDIO_SEND_REL_ADDR for SD Card */ #define SD_CMD_SET_DSR ((uint8_t)4) #define SD_CMD_SDIO_SEN_OP_COND ((uint8_t)5) #define SD_CMD_HS_SWITCH ((uint8_t)6) #define SD_CMD_SEL_DESEL_CARD ((uint8_t)7) #define SD_CMD_HS_SEND_EXT_CSD ((uint8_t)8) #define SD_CMD_SEND_CSD ((uint8_t)9) #define SD_CMD_SEND_CID ((uint8_t)10) #define SD_CMD_READ_DAT_UNTIL_STOP ((uint8_t)11) /*!< SD Card doesn't support it */ #define SD_CMD_STOP_TRANSMISSION ((uint8_t)12) #define SD_CMD_SEND_STATUS ((uint8_t)13) #define SD_CMD_HS_BUSTEST_READ ((uint8_t)14) #define SD_CMD_GO_INACTIVE_STATE ((uint8_t)15) #define SD_CMD_SET_BLOCKLEN ((uint8_t)16) #define SD_CMD_READ_SINGLE_BLOCK ((uint8_t)17) #define SD_CMD_READ_MULT_BLOCK ((uint8_t)18) #define SD_CMD_HS_BUSTEST_WRITE ((uint8_t)19) #define SD_CMD_WRITE_DAT_UNTIL_STOP ((uint8_t)20) /*!< SD Card doesn't support it */ #define SD_CMD_SET_BLOCK_COUNT ((uint8_t)23) /*!< SD Card doesn't support it */ #define SD_CMD_WRITE_SINGLE_BLOCK ((uint8_t)24) #define SD_CMD_WRITE_MULT_BLOCK ((uint8_t)25) #define SD_CMD_PROG_CID ((uint8_t)26) /*!< reserved for manufacturers */ #define SD_CMD_PROG_CSD ((uint8_t)27) #define SD_CMD_SET_WRITE_PROT ((uint8_t)28) #define SD_CMD_CLR_WRITE_PROT ((uint8_t)29) #define SD_CMD_SEND_WRITE_PROT ((uint8_t)30) #define SD_CMD_SD_ERASE_GRP_START ((uint8_t)32) /*!< To set the address of the first write block to be erased. (For SD card only) */ #define SD_CMD_SD_ERASE_GRP_END ((uint8_t)33) /*!< To set the address of the last write block of the continuous range to be erased. (For SD card only) */ #define SD_CMD_ERASE_GRP_START ((uint8_t)35) /*!< To set the address of the first write block to be erased. (For MMC card only spec 3.31) */ #define SD_CMD_ERASE_GRP_END ((uint8_t)36) /*!< To set the address of the last write block of the continuous range to be erased. (For MMC card only spec 3.31) */ #define SD_CMD_ERASE ((uint8_t)38) #define SD_CMD_FAST_IO ((uint8_t)39) /*!< SD Card doesn't support it */ #define SD_CMD_GO_IRQ_STATE ((uint8_t)40) /*!< SD Card doesn't support it */ #define SD_CMD_LOCK_UNLOCK ((uint8_t)42) #define SD_CMD_APP_CMD ((uint8_t)55) #define SD_CMD_GEN_CMD ((uint8_t)56) #define SD_CMD_NO_CMD ((uint8_t)64) /** * @brief Following commands are SD Card Specific commands. * SDIO_APP_CMD should be sent before sending these commands. */ #define SD_CMD_APP_SD_SET_BUSWIDTH ((uint8_t)6) /*!< For SD Card only */ #define SD_CMD_SD_APP_STAUS ((uint8_t)13) /*!< For SD Card only */ #define SD_CMD_SD_APP_SEND_NUM_WRITE_BLOCKS ((uint8_t)22) /*!< For SD Card only */ #define SD_CMD_SD_APP_OP_COND ((uint8_t)41) /*!< For SD Card only */ #define SD_CMD_SD_APP_SET_CLR_CARD_DETECT ((uint8_t)42) /*!< For SD Card only */ #define SD_CMD_SD_APP_SEND_SCR ((uint8_t)51) /*!< For SD Card only */ #define SD_CMD_SDIO_RW_DIRECT ((uint8_t)52) /*!< For SD I/O Card only */ #define SD_CMD_SDIO_RW_EXTENDED ((uint8_t)53) /*!< For SD I/O Card only */ /** * @brief Following commands are SD Card Specific security commands. * SDIO_APP_CMD should be sent before sending these commands. */ #define SD_CMD_SD_APP_GET_MKB ((uint8_t)43) /*!< For SD Card only */ #define SD_CMD_SD_APP_GET_MID ((uint8_t)44) /*!< For SD Card only */ #define SD_CMD_SD_APP_SET_CER_RN1 ((uint8_t)45) /*!< For SD Card only */ #define SD_CMD_SD_APP_GET_CER_RN2 ((uint8_t)46) /*!< For SD Card only */ #define SD_CMD_SD_APP_SET_CER_RES2 ((uint8_t)47) /*!< For SD Card only */ #define SD_CMD_SD_APP_GET_CER_RES1 ((uint8_t)48) /*!< For SD Card only */ #define SD_CMD_SD_APP_SECURE_READ_MULTIPLE_BLOCK ((uint8_t)18) /*!< For SD Card only */ #define SD_CMD_SD_APP_SECURE_WRITE_MULTIPLE_BLOCK ((uint8_t)25) /*!< For SD Card only */ #define SD_CMD_SD_APP_SECURE_ERASE ((uint8_t)38) /*!< For SD Card only */ #define SD_CMD_SD_APP_CHANGE_SECURE_AREA ((uint8_t)49) /*!< For SD Card only */ #define SD_CMD_SD_APP_SECURE_WRITE_MKB ((uint8_t)48) /*!< For SD Card only */ |
|
|
|
上官方驱动吧,官方驱动架构很严谨,稍微调整一下,就很好用了。
|
|
|
|
楼上可否发个demo让大家学习学习?
|
|
|
|
只有小组成员才能发言,加入小组>>
调试STM32H750的FMC总线读写PSRAM遇到的问题求解?
1561 浏览 1 评论
X-NUCLEO-IHM08M1板文档中输出电流为15Arms,15Arms是怎么得出来的呢?
1501 浏览 1 评论
933 浏览 2 评论
STM32F030F4 HSI时钟温度测试过不去是怎么回事?
665 浏览 2 评论
ST25R3916能否对ISO15693的标签芯片进行分区域写密码?
1555 浏览 2 评论
1849浏览 9评论
STM32仿真器是选择ST-LINK还是选择J-LINK?各有什么优势啊?
612浏览 4评论
STM32F0_TIM2输出pwm2后OLED变暗或者系统重启是怎么回事?
505浏览 3评论
509浏览 3评论
stm32cubemx生成mdk-arm v4项目文件无法打开是什么原因导致的?
490浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 18:28 , Processed in 0.525325 second(s), Total 51, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号