当前位置:网站首页>STM32F407ZGT6使用SDIO方式驱动SD卡
STM32F407ZGT6使用SDIO方式驱动SD卡
2022-06-30 11:06:00 【xqhrs232】
原文地址::STM32F407ZGT6使用SDIO方式驱动SD卡 - JavaShuo
相关文章
1、【STM32】 STM32官方标准固件库概述----【STM32】 STM32官方标准固件库概述_沧海一笑-dj的博客-CSDN博客_什么是stm32的固件库
2、stm32 sdio调试,修改官方例程bug,已成功调通SDIO读取SD卡----stm32 sdio调试,修改官方例程bug,已成功调通SDIO读取SD卡_cokewei的博客-CSDN博客_stm32sdio例程
3、https://community.st.com/s/global-search/stm3210e_eval_sdio_sd.c
4、https://community.st.com/s/global-search/CmdResp1Error
5、https://www.csdn.net/tags/NtzaQg3sNTUxMzMtYmxvZwO0O0OO0O0O.html
6、正点原子的代码 初始化金士顿8G Class 4 TF卡不成功 - STM32/STM8单片机论坛 - ST MCU意法半导体官方技术支持论坛 - 21ic电子技术开发论坛 7、SDIO + FATFS 写内存映射地址数据 死循环在 CmdResp1Error-OpenEdv-开源电子网
STM32F407ZGT6使用SDIO方式驱动SD卡
简介
本文主要讲解的是移植官方固件库(V1.5.1)中是SDIO来驱动SD卡。
SDIO
SDIO接口是在SD内存卡接口的基础上发展起来的接口,SDIO接口兼容以前的SD内存卡,并且可以连接SDIO接口的设备。
SDIO1.0标准定义了两种类型的SDIO卡:
- 1、全速的SDIO卡,传输率可以超过100Mbps;
- 2、低速的SDIO卡,支援的时脉速率在0至400KHz之间。
SDIO协议是由SD卡的协议演化升级而来的,很多地方保留了SD卡的读写协议,同时SDIO协议又在SD卡协议之上添加了CMD52和CMD53命令。由于这个,SDIO和SD卡规范间的一个重要区别是增加了低速标准,低速卡的目标应用是以最小的硬件开支来支持低速I/O能力。低速卡支持类似调制解调器,条形码扫描仪和GPS接收器等应用。高速卡支持网卡,电视卡以及组合卡等。组合卡指的是存储器+SDIO,对组合卡来操作需要全速和4BIT的传输模式,这是SDIO1.0标准规定的。
移植操作
注意查看图片中的路径
图一:如下
将选择的4个文件夹拷贝到你的过程下面(注意查看路径)
拷贝完成之后,请看图二:如下
将该路径下的的mian.c和main.h两个文件夹拷贝到工程下(注意该文件在固件库中的路径)
拷贝完毕之后,将main.c和main.h的名字改成—>SD_test.c和SD_test.h,内容可以进行相应的删除和更改!
将stm324xg_eval.c和stm324xg_eval.h中只保留跟SD卡相关的部分,其他进行注释即可,也可以不用进行注释,只要你不嫌占内存
如图3,就是我拷贝完毕并且进行更改之后的样子

打开工程,将这几个文件添加进工程中,先把SD_test.c中的main函数的名字改成SD_test
如图:
到这里,SD_test函数就更改完毕了,接下来进行扇区擦除、单模块擦除、多模块擦除函数的更改
进行编译,不出意外的话,会出现一个错误,
入下图:
将该图中的“stm32_eval_legacy.h”进行屏蔽或者删除即可
再次进行进行编译就会0错误
包含相应的.h,然后进行SD测试
测试结果如下
接下来可以就进行FATFS文件系统的移植
相关文章
- 1. sd卡驱动
- 2. SDIO控制器驱动SD卡的步骤一: SD卡上电(六)
- 3. Linux SD/MMC/SDIO驱动分析
- 4. SDIO挂载多张SD卡
- 5. 使用stm32-uclinux下的SD卡驱动
- 6. Linux SD卡驱动开发(二) —— SD 卡驱动分析HOST篇
- 7. Linux SD卡驱动开发(三) —— SD 卡驱动分析CORE篇
- 8. STM32 SD卡使用SDIO DMA卡死解决办法
- 9. STM32使用SDIO进行SD卡读写关于SD卡的操作部分
- 10. Linux SD卡驱动开发
- 更多相关文章...
- • SVN 启动模式 - SVN 教程
- • TortoiseSVN 使用教程 - SVN 教程
- • Git可视化极简易教程 — Git GUI使用方法
- • 常用的分布式事务解决方案
边栏推荐
- Esp32-c3 introductory tutorial basic part ⑫ - mass production burning device configuration and serial number, NVS partition confirmation, NVS partition generation program, CSV to bin
- 100 important knowledge points that SQL must master: using table aliases
- 相对位置编码Transformer的一个理论缺陷与对策
- How to analyze native crash through GDB
- 10 days to learn how to flutter Day10 flutter play animation and packaging
- 科普達人丨漫畫圖解什麼是eRDMA?
- MCU firmware packaging Script Software
- Kotlin 协程调度切换线程是时候解开谜团了
- 孔松(信通院)-数字化时代云安全能力建设及趋势
- EMC-浪涌
猜你喜欢

There are so many kinds of coupons. First distinguish them clearly and then collect the wool!

数字化不是试出来,而是蹚出来的|行知数字中国 × 富士康史喆

Wechat Emoji is written into the judgment, and every Emoji you send may become evidence in court

Is the golden cycle of domestic databases coming?

科普达人丨漫画图解什么是eRDMA?

How harmful are these "unreliable" experiences in the postgraduate entrance examination?

Mathematics (fast power)

【西安交通大学】考研初试复试资料分享

数据库连接池 druid

Xu Lei expressed three thanks for the most difficult 618 in 19 years
随机推荐
Dameng data rushes to the scientific innovation board, or becomes the "first share of domestic database" in the A-share market
数据库 自动增长
Qt嵌入子Qt程序窗口到当前程序
HMS core audio editing service 3D audio technology helps create an immersive auditory feast
揭秘得物客服IM全链路通信过程
The latest collection of arouter problems
Methods and usage of promise async and await
科普达人丨漫画图解什么是eRDMA?
林克庆到番禺区调研“发展要安全”工作 以“时时放心不下”责任感抓好安全发展各项工作
SQL必需掌握的100个重要知识点:使用视图
TypeScript ReadonlyArray(只读数组类型) 详细介绍
The operation and maintenance security gateway (Fortress machine) of Qiming star group once again won the first place!
[leetcode 239] sliding window
以PolarDB为代表的阿里云数据库以跻身全球第一阵营
PointDistiller:面向高效紧凑3D检测的结构化知识蒸馏
Le talent scientifique 丨 dessins animés qu'est - ce qu'erdma?
Esp32-c3 introductory tutorial question ⑨ - core 0 panic 'ed (load access fault) Exception was unhandled. vfprintf. c:1528
100 important knowledge points that SQL must master: creating and manipulating tables
Mathematics (fast power)
CVPR 2022 | greatly reduce the manual annotation required for zero sample learning. Mapu and Beiyou proposed category semantic embedding rich in visual information