cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
391 Views
Registered: ‎11-10-2019

Using SD bare metal on ZCU104

Jump to solution

ZCU104, Vivado 2019.1.3, Ubuntu 18.04

I would like to use an SD interface to read/write data to the card with no OS. There are tons of similar questions but nothing that helps me getting it to work. Currently, I have two issues with the board:

1. When I run the board in debug mode (hooked to the PC) and the card is inserted, the processor is trying to boot from the SD card. How do I prevent it booting from the SD card?

2. For some reason the SDK does not have an SD example. Why is that and where can I find a working example for ZCU104 board?

Any comments would be greatly appreciated.

1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
285 Views
Registered: ‎03-25-2019

Re: Using SD bare metal on ZCU104

Jump to solution

Hi @naz_rb,

> 1. When I run the board in debug mode (hooked to the PC) and the card is inserted, the processor is trying to boot from the SD card. How do I prevent it booting from the SD card?

Your target is booting from SD card because the boot mode is set to SD mode.

To use the target with SDK you should set the boot mode to JTAG boot mode:

 

jtag.png

This could be done by setting the SW6 dip switch to ON, ON, ON, ON

 

sw6.png

 

> 2. For some reason the SDK does not have an SD example. Why is that and where can I find a working example for ZCU104 board?

You could use the SDPS standalone driver offred by Xilinx. This driver is used to initialize, read from and write to the SD card.
You could find further details about this driver from this Wiki_page or from the driver Doxygen_documentation
 
There is also an example showing how to use the driver xilffs_polled_example.c
 
Best regards,
Abdallah
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution

View solution in original post

3 Replies
Highlighted
Explorer
Explorer
314 Views
Registered: ‎08-02-2019

Re: Using SD bare metal on ZCU104

Jump to solution

Hi @naz_rb ,

To boot from the dual Quad SPI and SD card described in page 17 of this document.

Maybe this document also helps you.

Regards,

Saban

Highlighted
Moderator
Moderator
286 Views
Registered: ‎03-25-2019

Re: Using SD bare metal on ZCU104

Jump to solution

Hi @naz_rb,

> 1. When I run the board in debug mode (hooked to the PC) and the card is inserted, the processor is trying to boot from the SD card. How do I prevent it booting from the SD card?

Your target is booting from SD card because the boot mode is set to SD mode.

To use the target with SDK you should set the boot mode to JTAG boot mode:

 

jtag.png

This could be done by setting the SW6 dip switch to ON, ON, ON, ON

 

sw6.png

 

> 2. For some reason the SDK does not have an SD example. Why is that and where can I find a working example for ZCU104 board?

You could use the SDPS standalone driver offred by Xilinx. This driver is used to initialize, read from and write to the SD card.
You could find further details about this driver from this Wiki_page or from the driver Doxygen_documentation
 
There is also an example showing how to use the driver xilffs_polled_example.c
 
Best regards,
Abdallah
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution

View solution in original post

Highlighted
Adventurer
Adventurer
230 Views
Registered: ‎11-10-2019

Re: Using SD bare metal on ZCU104

Jump to solution

@abouassi  That xilffs poll example is what I need (and I assume the xsdps driver is abstracted by ffs library).

0 Kudos