在MINI开发板上我开始使用SPI接口实现一个读卡器,在Windows上写的速度是200KB左右,满足不了要求。后来我改成使用SDIO接口+DMA的方式来读写SD卡,但是在Windows上写文件的速度只有250KB左右,速度提高不明显啊。 我使用的是库函数版本是3.5的。请求指导一下,怎么提高U盘的读写速度啊???
另外,如果我想使用外接USB的高速PHY芯片,如USB3300 芯片,是不是只能使用STM32F2或者STM32F4的主控啊?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
[mw_shl_code=c,true]printf("Write single sector time begin ... ");
couter_time = 0;
TIM_Cmd(TIM3, ENABLE);
for(i=0; i<10000; i++)
{
SDCARD_Write_Sector(read_write_buf,1000+i,1);
}
TIM_Cmd(TIM3, DISABLE);
printf("Write single sector time over ... ");
printf("write single: time=%d s ",couter_time);
printf("write single: speed=%d KBps ",5120/couter_time);//(512 * 1000/1024)=5120
printf("Read single sector time begin ... ");
couter_time = 0;
TIM_Cmd(TIM3, ENABLE);
for(i=0; i<10000; i++)
{
SDCARD_Read_Sector(read_write_buf,1000+i,1);
}
TIM_Cmd(TIM3, DISABLE);
printf("Read single sector time over ... ");
printf("Read single : time=%d s ",couter_time);
printf("Read single : speed=%d KBps ",5120/couter_time);//(512 * 1000/1024)=5120
printf("Write multi sector time begin ... ");
couter_time = 0;
TIM_Cmd(TIM3, ENABLE);
for(i=0; i<10000; i+=20)
{
while( SDCARD_Write_Sector(read_write_buf,20000+i,20) == 0xff){};
}
TIM_Cmd(TIM3, DISABLE);
printf("Write multi sector time over ... ");
printf("write multi: time=%d s ",couter_time);
printf("write multi: speed=%d KBps ",5120/couter_time);//(512 * 1000/1024)=5120
printf("Read multi sector time begin ... ");
couter_time = 0;
TIM_Cmd(TIM3, ENABLE);
for(i=0; i<10000; i+=20)
{
while( SDCARD_Read_Sector(read_write_buf,20000+i,20) == 0xff ){};
}
TIM_Cmd(TIM3, DISABLE);
printf("Read multi sector time over ... ");
printf("Read multi : time=%d s ",couter_time);
printf("Read multi : speed=%d KBps ",5120/couter_time);//(512 * 1000/1024)=5120[/mw_shl_code]
一周热门 更多>