向TF卡写数据每写512字节会有一段长延时

2019-07-20 23:56发布

大家好,我现在要通过STM32采集外部ADC的数据写入到TF卡中,TF卡读写用的SDIO,用的是原子哥的战舰板FATFS例程,现在出现一个奇怪的现象,每向SD卡写入512字节就会出现一段长的延时,这会导致ADC采集的点数不均匀,我还以为是ADC采集的问题,就把ADC注释掉,换成了IO口电平翻转,结果还是会出现每写入512字节出现一段长延时,哪位知道请指教一下。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
7条回答
nashui_sx
2019-07-21 16:57
九天揽月 发表于 2019-6-10 10:27
修改了这里的值为32,示波器观察还是没有啥变化,跟原来的一样,是不是改的不对啊?

#define        _MIN_SS                512
#define        _MAX_SS                512
/* These options configure the range of sector size to be supported. (512, 1024,
/  2048 or 4096) Always set both 512 for most systems, all type of memory cards and
/  harddisk. But a larger value may be required for on-board flash memory and some
/  type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured
/  to variable sector size and GET_SECTOR_SIZE command must be implemented to the
/  disk_ioctl() function. */

你不用dma写sd卡的话,改多大写都需要时间呀

一周热门 更多>