做了一个遍历4g mmc例子;
先写入,再读出,再校验;
当单次读、写、校验对比文件为1M字节时基本没问题;当单次文件为8M时,在读取或校验对比时总会进入data aboart异常;
每次调制中在异常中打印信息如下:
Data abort with Data Fault Status Register 805
Address of Instruction causing Data abort 102AAC
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 5
Address of Instruction causing Data abort 11FE68
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 5
Address of Instruction causing Data abort 11FE68
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 5
Address of Instruction causing Data abort 11FE68
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 1
Address of Instruction causing Data abort 11FE68
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 5
Address of Instruction causing Data abort 11FE68
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 5
Address of Instruction causing Data abort 120068
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 1
Address of Instruction causing Data abort 120068
//////////////////////////////////////////////////////////////
Data abort with Data Fault Status Register 5
Address of Instruction causing Data abort 1200A8
//////////////////////////////////////////////////////////////
exf_getfree(Path,&emmc_total,&emmc_free); //获取剩余空间
if(emmc_free < 8192) //跳出
{
xil_printf("emmc free space:%lu KB,no space to write once again.\r\n",emmc_free);
xil_printf("Test write num:%lu.\r\n",emmc_i);
xil_printf("Total number of errors written to the fault record file:%u.\r\n",sd_error_num);
return;
}
else
{
xil_printf("Test write num:%lu.\r\n",emmc_i + 1);
xil_printf("emmc free space:%lu KB.\r\n",emmc_free);
}
xil_printf("Test write 8MB file.file name %lu.txt\r\n",emmc_i + 1);
//SD卡写数据
sd_write_data(FILE_NAME,(u32)WR_Buf,0X800000,0);
xil_printf("Test read 8MB file.file name %lu.txt\r\n",emmc_i + 1);
//SD卡读数据
sd_read_data(FILE_NAME,(u32)RD_Buf,0X800000,0);