osmaan_khan Posted November 22, 2018 Share Posted November 22, 2018 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. Link to comment Share on other sites More sharing options...
jpeyron Posted November 26, 2018 Share Posted November 26, 2018 Hi @osmaan_khan, Here is a forum thread where a customer is using the SD card on the Arty-Z7. This should be a good reference for your project. thank you, Jon Link to comment Share on other sites More sharing options...
osmaan_khan Posted December 2, 2018 Author Share Posted December 2, 2018 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. Link to comment Share on other sites More sharing options...
osmaan_khan Posted December 2, 2018 Author Share Posted December 2, 2018 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. Link to comment Share on other sites More sharing options...
osmaan_khan Posted December 2, 2018 Author Share Posted December 2, 2018 I found the error. It says physical drive cannot work. But my sd card is working fine. Link to comment Share on other sites More sharing options...
jpeyron Posted December 3, 2018 Share Posted December 3, 2018 Hi @osmaan_khan, Is your SD card formatted to FAT32? thank you, Jon Link to comment Share on other sites More sharing options...
osmaan_khan Posted December 3, 2018 Author Share Posted December 3, 2018 Yes, with 32 bit chunk size. Link to comment Share on other sites More sharing options...
jpeyron Posted December 3, 2018 Share Posted December 3, 2018 Hi @osmaan_khan, Have you tried a different SD card? thank you, Jon Link to comment Share on other sites More sharing options...
osmaan_khan Posted December 4, 2018 Author Share Posted December 4, 2018 Yes,I have used a different sd card. I think my problem is in the hardware design. But I don't know what. Link to comment Share on other sites More sharing options...
jpeyron Posted December 4, 2018 Share Posted December 4, 2018 Hi @osmaan_khan, Here is a forum thread that has a completed Vivado/SDK 2018.2 project that uses the zedboard, on-board SD card reader and the Pmod GPS. cheers, Jon Link to comment Share on other sites More sharing options...
osmaan_khan Posted December 12, 2018 Author Share Posted December 12, 2018 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 Link to comment Share on other sites More sharing options...
jpeyron Posted December 12, 2018 Share Posted December 12, 2018 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 Link to comment Share on other sites More sharing options...
osmaan_khan Posted December 19, 2018 Author Share Posted December 19, 2018 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. Link to comment Share on other sites More sharing options...
jpeyron Posted December 19, 2018 Share Posted December 19, 2018 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 Link to comment Share on other sites More sharing options...
Question
osmaan_khan
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.
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.