Hardware Developers Community - NI sbRIO & SOM

cancel
Showing results for 
Search instead for 
Did you mean: 

SD Card Peripheral on sbRIO-9607

Hi,

 

I'm trying to use the SDIO Clip on sbRIO 9607 to get SD card supported. However, I'm running into a weird issue. According to the available documents that I can find, there is no limitation on the DIO pin assignment. When I was doing an evaluation with NI 9694, I used the following pin mapping and got it work well during my test.

Screen Shot 2019-01-23 at 09.20.39.pngLater, I built a simple PCB with another pin assignment but found that the SD card cannot be mounted. I switched back to do the experiment through NI 9694 with the same pin assignment as below and did find it not work this time.

Screen Shot 2019-01-23 at 09.21.36.png

Then, I tried several other pin mapping schemes and found that some could work, some couldn't and some could work occasionally. Meanwhile, another weird thing is that a same bitfile could make sbRIO A work while fail on sbRIO B.

I'm wondering whether anybody can shed a light on me about this issue. Is there any limitation or guidance to make SDIO work stably?

 

Thanks,

Richie

0 Kudos
Message 1 of 10
(5,111 Views)

Hi Richie,

 

Have you made sure to load the bitfile from flash memory? This is necessary to make sure the SD card is available before the OS boots. Otherwise the SD card won't mount at boot. It's possible that this was done with your original evaluation but not in this new test.

 

Make sure to compile the bitfile with the "Run when loaded to FPGA" option checked in the compilation properties then load the bitfile to flash memory. The documentation for that process can be found here: http://zone.ni.com/reference/en-XX/help/371599N-01/lvfpgahelp/downloading_fpga_vi_to_flash/

 

This might not be the root issue in your case, but it's a common sticking point that is worth checking first.

 

Regards,

Will

National Instruments

0 Kudos
Message 2 of 10
(5,006 Views)
Hi, Will Thanks for your quick guidance. I will try it next Monday when I'm in office. But what I'm sure is that I did all my evaluation with LabVIEW FPGA interactive run mode, which means that I didn't download anything to flash in my memory. Of course, I will definitely try your suggestion because maybe I forgot I did that. I have a quick question on your comment "This is necessary to make sure the SD card is available before the OS boots.". The SD card in this sentence refers to the SD card reader, right? I'm a little confused because once the SD card can be recognized, I can hot plug the card as I want. Thanks, Richie
0 Kudos
Message 3 of 10
(4,997 Views)

Hi Richie,

 

You're correct, I should have said that the SD card reader would not be seen at boot rather than the card itself since the CD line will handle hot plugging the card. I'm more concerned with the card reader and associated circuitry, including things like the pull up on CD being correctly connected through the CLIP at boot.

 

Will

0 Kudos
Message 4 of 10
(4,990 Views)

Hi, Will,

 

I'm trying to follow your instructions to load the bitfile from flash today. However, my Device Settings tab is disabled for my 9607 target. Any hint? BTW, because I cannot make the settings on Device Settings tab, I'm sure that my bitfile is not loaded and run on boot.

 

Screen Shot 2019-01-28 at 15.19.23.png

 

Thanks,

Richie

0 Kudos
Message 5 of 10
(4,976 Views)

Hi Richie,

 

That tab isn't available for Zynq-based targets. Instead, the "Run when loaded to FPGA" option must be selected in the compilation properties.  Could you try setting it from here then rebuilding?

 

2019-01-28 13_37_14-My Compilation Properties.png

 

Sorry for not making this step clear in my original post.

 

Best,

Will

 

 

0 Kudos
Message 6 of 10
(4,970 Views)

Hi, Will

 

No need to say sorry. You are always giving promising guide to me.

 

I've tried to rebuild the bitfile with this option on. But it turns out this does not help a lot. Or I'd say, the behavior is unstable. Sometimes, it works; sometimes, it does not work. I cannot tell when it's happy or unhappy. 😞

 

I'm now using LV FPGA 2016. Do you think there was any potential bug that might affect it? Do you have any other suggestion on what I could try for further investigation?

 

Thanks,

Richie

0 Kudos
Message 7 of 10
(4,964 Views)

Hey Richie,

 

I'm curious whether it's an issue if you try manually mounting the SD card rather than relying on it to auto-mount at boot. Have you tried that? Does it show up at all when you run the "lsblk" command? It should be labeled as mmcblk0.

 

It might also be useful to run "dmesg" to see if there's any sign of mmcblk0.

 

-Will

0 Kudos
Message 8 of 10
(4,957 Views)

Hey, Will

 

I'm using the SD card as a temporary storage to compensate for 512 MB flash storage. I just want the SD card to be recognized correctly and stably after my rtexe starts to run.

 

I've tried your recommended command. Please check out the dialog below. It seems that the card is recognized but the data transfer cannot be completed promptly. I suppose that there is some issue in the HW connection. Do you have any idea on this error and any recommendations for me?

 

My point of view is that the handshaking signals for the reader work well while there is something wrong with the data channel. There should be something wrong on HW connection, such as pull-up resistors are missing.

 

Screen Shot 2019-01-30 at 15.39.51.png

 

Thanks,

Richie

0 Kudos
Message 9 of 10
(4,950 Views)

Hi Richie,

 

Thanks for the additional info. I agree that there could be a hardware connection issue based on these results. I assume you've copied the SDIO circuit from the 9607 RMC design guide, correct? Could you share the SD portion of your schematic and PCB layout? Maybe there's a discrepancy there. If you aren't comfortable sharing that information publicly feel free to private message me.

 

Best,

Will

0 Kudos
Message 10 of 10
(4,912 Views)