回复【2楼】正点原子: --------------------------------- 是在死在这个函数 :DRESULT disk_write ( BYTE drv, /* hysical drive nmuber (0..) */ const BYTE *buff, /* Data to be written */ DWORD sector, /* Sector address (LBA) */ BYTE count /* Number of sectors to write (1..255) */ )
/* Write block of 512 bytes on address 0*/ Status = SD_WriteBlock((uint8_t *)buff, sector << 9, _MAX_SS); /* Check if the Transfer is finished */ //Status = SD_WaitWriteOperation(); while(SD_GetStatus() != SD_TRANSFER_OK); 此处写完数据到TF卡后,检查是否完成,返回的是SD_TRANSFER_BUSY,并且不是系统一上电就卡死的,而是运行一段时间出现的现象不好查找问题出在哪里
---------------------------------
是在死在这个函数
:DRESULT disk_write (
BYTE drv, /* 
const BYTE *buff, /* Data to be written */
DWORD sector, /* Sector address (LBA) */
BYTE count /* Number of sectors to write (1..255) */
)
/* Write block of 512 bytes on address 0*/
Status = SD_WriteBlock((uint8_t *)buff, sector << 9, _MAX_SS);
/* Check if the Transfer is finished */
//Status = SD_WaitWriteOperation();
while(SD_GetStatus() != SD_TRANSFER_OK);
此处写完数据到TF卡后,检查是否完成,返回的是SD_TRANSFER_BUSY,并且不是系统一上电就卡死的,而是运行一段时间出现的现象不好查找问题出在哪里
---------------------------------
不用DMA试试
一周热门 更多>