I am trying to run a standalone sd card read & write program to test the speed as follow:
// SDIO Controller Test
static XSdPs ps7_sd_0;
XSdPs_Config * SdConfig_0;
u8 RxBuffer[512*2];
int Status;
SdConfig_0 = XSdPs_LookupConfig(XPAR_PS7_SD_0_DEVICE_ID);
tif (NULL == SdConfig_0) {
ttreturn XST_FAILURE;
t}
tStatus = XSdPs_CfgInitialize(&ps7_sd_0, SdConfig_0, SdConfig_0->BaseAddress);
tif (Status != XST_SUCCESS) {
ttprint("Sd Config failed !
r");
ttreturn XST_FAILURE;
t}
tStatus = XSdPs_SdCardInitialize(&ps7_sd_0);
tif (Status != XST_SUCCESS) {
ttprint("Sd0 Initialization failed !
r");
ttreturn XST_FAILURE;
t}
t// read and write test
tStatus = XSdPs_ReadPolled(&ps7_sd_0, 0x01, 0x01, RxBuffer);
tif (Status != XST_SUCCESS) {
ttprint("Sd1 Read failed !
r");
ttreturn XST_FAILURE;
t}
The last read function fails, anyone knows why ?