Author Topic: Read/write SD card in SPI mode  (Read 87 times)

siso

  • Active Member
  • *
  • Posts: 2
Read/write SD card in SPI mode
« on: June 23, 2020, 04:37:41 PM »
Hello,

As a base for development I am using an Artix-7 platform (TE0712 + TE0703) running the TE0712 reference design 'hello_te0712'.

I was wondering if there is any information / pointers available on how to perform read + write to the micro-SD card on the TE0703 using SPI mode. Perhaps using microblaze + Xilinx Quad-SPI core and drivers (setup and driven appropriately).  I would still like to boot from QSPI flash, but after boot have access to the SD card to read / store data.

Any advice is greatly appreciated!

Thanks,
Sav

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1319
Re: Read/write SD card in SPI mode
« Reply #1 on: June 24, 2020, 11:19:27 AM »
Hi,
SD is not possible with native FPGA modules, only with Zynq modules:
https://wiki.trenz-electronic.de/display/PD/4+x+5+SoM+Carriers

Theoretical you can use a soft IP, but we never test it and the only IP I know is not for free :
https://www.xilinx.com/products/intellectual-property/1-ii2qo3.html#productspecs

br
John

siso

  • Active Member
  • *
  • Posts: 2
Re: Read/write SD card in SPI mode
« Reply #2 on: June 25, 2020, 11:00:51 AM »
Hi John,

Thank you for the information and links.  I am surprised that Xilinx do not provide software/firmware to communicate with SD card from microblaze / FPGA, perhaps there are so many variants of memory card out there they feel it best to leave it up to customers to roll their own.  I will proceed using a microblaze and the Xilinx Quad SPI IP+drivers and create an additional simplified layer in software to handle the required SD protocol (unless anyone here thinks that's a no-go!).

Thanks,
Sav

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1319
Re: Read/write SD card in SPI mode
« Reply #3 on: June 25, 2020, 01:27:14 PM »
Hi,
not impossible but certainly not the easiest way to support all SD card variants and protocols....otherwise you would find a lot ready to work IPs on WWW.

Maybe you should search a little bit, I found for example :
https://www.fpga4fun.com/SD.html

br
John