Sorry, you need to enable JavaScript to visit this website.

Access SD card from PL

Zedboard forums is currently read-only while it under goes maintenance.

Solved
10 posts / 0 new
dangmug
Junior(0)
Access SD card from PL

How can I read and write to the SD card without using Linux? I would like to be able to access the SD card from a standalone application and/or the programmable logic without using Linux.

I couldn't find much information on how to communicate with the SD controller. Any help would be appreciated.

Thanks

TimDuffy
Junior(2)
dangmug,

dangmug,

If you reference the Zedboard schematic:

http://zedboard.org/sites/default/files/documentations/ZedBoard_RevC.1_S...

you will see the interface to the SD-Card is on sheet 6, and the connections to the Zynq IC are on page 10. The pins come into the PS MIO interface pins, and thus can not be directly interfaced too via the PL portion of the Zynq device.

You could, however, write some bare-metal code in the ARM to translate requests from the PL portion of Zynq and pull data from and push data to the SD-Card.

Why is it that you would like to interface to the card not using Linux?/the ARM core(s)?

dangmug
Junior(0)
Bare Metal Code

Keith,

Thanks for the response. I am OK with doing a bare metal application to transfer the data. It may be preferred as I can do some other simple logic to go along with my pl.

What I can't figure out is how to read/write using the bare metal application. When I create my own axi core the software makes a simple driver for me that I can use to r/w to it. I don't see anything like that for the SD card. I have the address for it on the bus in my system.xml, but what do I read/write from/to that address in order to actually read and write usable information on the sd card?

My goal right now is to have pixel data saved on the SD card that I pull off and send to my pl. I want to then send the processed image data back to the SD card as another file.

We will probably use Linux in our final design, but I want to know how to do this with the bare metal application to help increase my understanding of how it all works. My thought is that this should be pretty simple, I just can't figure it out.

Thanks,

Dangmug

dangmug
Junior(0)
Thanks Tim

Tim. Sorry, I meant to thank you, not Keith in my previous post.

civili
Junior(0)
There is EMIO connected with

There is EMIO connected with PL, could PL write/read data from SD card through EMIO directly without PS involving, such as bare-metal mode?

Keith Cancel
Junior(0)
This is some what similar I

This is some what similar I was looking at the graphical representation of the how the peripherals are hooked up to the chip. It appears the ram is directly hooked up the processor. Is it all possible to have the pl modify the contents of the ram while the processor run? My gut tells me no after looking over stuff briefly.

TimDuffy
Junior(2)
Keith Canel,

Keith Canel,

Since this is an unrelated question to the OP's, could you post this as a separate forum post? I would be more than happy to answer it there.

Thanks.

partiot
Junior(0)
same problem!

I have the same question : how to find SD Card host driver fore bare metal application ? i do not want to deep into initialisation procedure of SD card
TimDuffy Did you find an answer?

If linux does the job, is it easy/possible to extract the sd driver from linux files?

TimDuffy
Junior(2)
partiot,

partiot,

There appears to be a great discussion over on the Xilinx Forums here:

http://forums.xilinx.com/t5/EDK-and-Platform-Studio/XPS-SPI-Core-and-SD-...

I would not suggest referencing the Linux Drivers, as they will be abstracted slightly to work with many different interfaces.

Hammad
Junior(0)
Write Data to Sdcard

Hi, I want to write data to Sdcard.
What I want to do is Have input coming from ADC send that data from PL to PS and write it on DRAM. Uptill Now I am done with this. Now i Want to read data written in Dram and Write the read data to SDCARD. Please help

Thanks