Question

Hi, I am new to fpga. I am trying to read/write from sd card zusing the zybo zynq 7000 and I found the Xillfs example. For some reason the mkfs function always fails. I don't know if there is a problem with my design?

I have enabled the sd0 in zynq processing system. 

Is the something else I should do? 

 

Any help is appreciated. 

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Hi, 

He is using the same code I am. 

The problem is my fpga fails to create volume on the sdcard. I have tried a different fpga with different sd cards.i don't know what I am doing wrong. 

Help!!!  

I am working on data logging to sd card. 

Share this post


Link to post
Share on other sites
  • 0

Hi, 

He is using the same code I am. 

The problem is my fpga fails to create volume on the sdcard. I have tried a different fpga with different sd cards.i don't know what I am doing wrong. 

Help!!!  

I am working on data logging to sd card. 

Share this post


Link to post
Share on other sites
  • 0

Hello,

After your help the last time i was able to mount and create a file system but now my code is stuck on writing to sd card.

The error it gives is "(1) A hard error occurred in the low level disk I/O layer */".

i have attached my code,any help is appreciated.

datalogging_v1.txt

Share this post


Link to post
Share on other sites
  • 0

Hi @osmaan_khan,

The error  FR_DISK_ERR is from the DFATFS.h file. It look like your alignment might be off, formatted wrong, or corrupted. Have you tried a different SD card such as a samsung or a san disk card if you are not already.

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi,

I have formatted the card with FAT32 with 32 kb chunk size. And yes I have already used different  sd cards.

I was thinking about using linux on fpga. Should I? 

Can you point me in that direction?

Thank you for your time. 

Share this post


Link to post
Share on other sites
  • 0

Hi @osmaan_khan,

I have attached working sdk code for the SD card and Pmod GPS. I believe it will still print to the sd card if you do not have a Pmod GPS connected to the board.  

Here is the Petalinux Support for Digilent Boards table. There is a project done for the Zybo. Make sure to read the readme file. 

thank you,

Jon

main.c

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now