Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
SDIO总线
SD卡_TF卡
虚拟文件
5
studio配置SD卡和虚拟文件系统,测试SD卡写入速度只有100多KB/s?
发布于 2020-09-15 14:11:27 浏览:2580
订阅该版
我用rtthread studio中的sd卡使用虚拟文件系统例程写入数据,我测的写入速度为120kb/s,看了下它的有关于sd卡初始化的代码,看不太懂,然后看了下原子的sd卡初始化过程,发现sd卡初始化后需要再设置下时钟,但是在rtt里面我没有找到相关的配置,有大佬知道什么原因导致速度过慢吗?怎么解决,求教,测试sd卡写入速度代码如下: ```c int fd, size; float speed ; float speed_time; int i; char buf[20]; int8_t s[256] = "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!" "RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer! RT-Thread Programmer!"; char buffer[80]; /* 以创建和读写模式打开 /text.txt 文件,如果该文件不存在则创建该文件 */ rt_kprintf("Write ...........\n"); rt_kprintf("tick is :%d !\n", rt_tick_get()); speed = rt_tick_get(); fd = open("/text.txt", O_WRONLY | O_CREAT | O_APPEND); if (fd>= 0) { for (i = 0; i < 1024; ++i) { write(fd, s, sizeof(s)); } close(fd); rt_kprintf("tick is :%d !\n", rt_tick_get()); speed = rt_tick_get()-speed; speed_time = 1000/speed; speed_time = (sizeof(s)*speed_time); sprintf((char*)buf, "%3.1f",(float)speed_time); rt_kprintf("Write done. speed:%f kb/s\n",speed_time); } /* 以只读模式打开 /text.txt 文件 */ fd = open("/text.txt", O_RDONLY); if (fd>= 0) { size = read(fd, buffer, sizeof(buffer)); close(fd); // rt_kprintf("Read from file test.txt : %s \n", buffer); if (size < 0) return ; } } ```
查看更多
lizhen9880
认证专家
2020-09-15
这家伙很懒,什么也没写!
可做如下尝试: ## 方法1 如下drv_sdio.h中,默认SDIO_MAX_FREQ只有1M,将SDIO_MAX_FREQ根据自己的MCU SDIO的最高频率改大,可改到24M ![image.png](/uploads/20200915/8a7a7aa2278dea1531f0b8e7cab010a4.png) **如果这样做有效,建议你按照方法2来** ## 方法2 建议你修改board/Kconfig,增加如下配置 ```bash if BSP_USING_SDCARD config SDIO_MAX_FREQ int "sdio max freq" range 0 24000000 default 1000000 endif ``` 这样会在rt_config.h中增加SDIO_MAX_FREQ宏,drv_sdio.h中失效(如果你的Kconfig中已经有该项了,直接配置即可)
3
个回答
默认排序
按发布时间排序
chenyingchun
2020-09-16
这家伙很懒,什么也没写!
请按照lizhen9880的建议再试一下看看, 我这边用的F413, SDIO_MAX_FREQ 设置的50000000, 实测下来,写入速度可以最高可以达到3MByte/s ![SDIO.png](/uploads/20200916/5492a39b7c32d4648d7038a8ee3a33d0.png)
aozima
2020-09-15
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
测速可以用这个 `examples\file\writespeed.c`
撰写答案
登录
注册新账号
关注者
1
被浏览
2.6k
关于作者
youstay
这家伙很懒,什么也没写!
提问
2
回答
1
被采纳
0
关注TA
发私信
相关问题
1
代码分享,stm32f407的sdio驱动。
2
求个在STM32F103 RTT上使用SDIO接口的例子
3
是否能增加一个 SDIO AP61xx 的驱动呢
4
sdio和fsmc驱动lcd冲突
5
发现了sdio_unregister_driver里的一个bug
6
用sdio框架驱动过w8801(wifi模块)的坛友请进(已解决)
7
关于rt-thread系统sdio驱动框架使用
8
问题请教,关于在rt-thread中调试RT1052中调试sdio wifi模块
9
【文件系统学习】+海中陆地+RT-Thread文件系统学习挂载SDIO...
10
sdio驱动是怎么使用的?也没有文档和例程啊
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
2
RT-Thread 发布 EtherKit开源以太网硬件!
3
rt-thread使用cherryusb实现虚拟串口
4
《C++20 图形界面程序:速度与渲染效率的双重优化秘籍》
5
《原子操作:程序世界里的“最小魔法单位”解析》
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
ota在线升级
UART
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
at_device
ulog
C++_cpp
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
张世争
8
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
KunYi
6
个答案
1
次被采纳
本月文章贡献
程序员阿伟
6
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部