UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
8,443 Views
Registered: ‎07-28-2013

Zedboard standalone SD card read & test program fails

I am trying to using standalone program to test the SD card read and write speed, the program is 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);
    if (NULL == SdConfig_0) {
        return XST_FAILURE;
    }

    Status = XSdPs_CfgInitialize(&ps7_sd_0, SdConfig_0, SdConfig_0->BaseAddress);
    if (Status != XST_SUCCESS) {
        print("Sd Config failed !\n\r");
        return XST_FAILURE;
    }


    Status = XSdPs_SdCardInitialize(&ps7_sd_0);
    if (Status != XST_SUCCESS) {
        print("Sd0 Initialization failed !\n\r");
        return XST_FAILURE;
    }

    // read and write test
    Status = XSdPs_ReadPolled(&ps7_sd_0, 0x01, 0x01, RxBuffer);
    if (Status != XST_SUCCESS) {
        print("Sd1 Read failed !\n\r");
        return XST_FAILURE;
    }

 

 

The board is zedboard rev c with vivado 2013.4.

 

The last read function fails, anyone knows why ? Thanks.

 

0 Kudos
1 Reply
Highlighted
6,943 Views
Registered: ‎08-22-2015

Re: Zedboard standalone SD card read & test program fails

Hi doony,

You can find a detailed tutorial with source code on how to use the SD card on a standalone SDK project targeting the Zynq7000 (Zedboard ) on this link http://embeddedcentric.com/data-logging-using-sd-cards/

 

Regards

Ali

0 Kudos