Jump to content
  • 0

How to communicate with the Pmod Micro SD ?


Thomas TRUILHE

Question

Good afternoon,

my company recently bought a Pmod Micro SD card that I have to interface with a microcontroller.

Looking at the Reference Manual, it seems that it is possible to communicate with the SD Card using the SPI Protocol.

As I remember, the SPI protocol uses 4 pins (CS, MOSI, MISO and CLK), however on the input connected I can also found DAT1 and DAT2 signals. Could you please explain me what are these signals exactly ?

Moreover, it is written in the document that the PMod Micro SD card boots up in SD Mode.

I would like to know what it means. Is it another way to communicate with the SD card ? Is it another protocol ? Maybe using the DAT1 and DAT2 and maybe DAT 3 ???

 

Could you please explain me how the PMod Micro SD works ?

Moreover, I can see in the reference manual that the process is abstracted away within the chipKIT SD Library and Digilent Pmod SD IP Core.

What are these things exactly ? Do I have to use one of them in my firmware development ? Maybe the two ??

Could you please give me as much details as possible ?

 

Best regards,

Thomas TRUILHE

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I have few more question please. 

It is written in the Reference Manual that the communication can be over 1 bit or 4 bits ? 

Could you explain me what does this significates ? Is it related to SPI or SD Mode or something like that ? Or can we use Quad Spi ?

 

Last question, is it mandatory to use the chipKIT SD Library to use the module.

I would like to implement a filesystem on the sd card and I can see that there are a lot of examples provided with my microcontroller (Espressif).

These examples explain how to communicate with a sd card using SPI and how to mount a filesystem on it but how can be sure that

it can work with the Psmod Module ? Is the way of reading or writting on a SD Card normalized between all the manufacturers ?

This question because I can see on the reference manual that everything that I linked to reading/writting to PsMod SD Card is abstracted in your chipKit.

Is it possible that it is the same process in Espressif examples ?

 

Thank you for all your help. I would like to understand how to use your device before doing something.

Best regards,

Thomas TRUILHE

Link to comment
Share on other sites

  • 0

Hi @Thomas TRUILHE,

Short answer:

Quote

Is it possible that it is the same process in Espressif examples ?

Yes, you can use the Espressif examples instead of the Digilent made library. The Pmod microSD (and Pmod SD) are just housings; there are no integrated circuits to configure, they just facilitate the electrical connections between pins on the SD card and the host microcontroller/FPGA/whatever platform.

Long answer:

In terms of general usage, there is no difference between a micro SD and a regular SD card (hence why some micro SD cards will come with plastic housing adapters to change them to the full size SD card).

I don't know which particular Espressif microcontroller you have, but the short answer is if the SD card example that comes with the Espressif library is based on the FAT32 library (odds this is the case is quite high) and lets you connect an SD card adapter of some kind to external pins (as opposed to using an already embedded SD card housing on the microntroller), then the Pmod microSD will work without issue.

The Digilent made library is more akin to a wrapper (convenient function calls that users can make on the PIC32 microcontrollers Digilent used to make so users didn't have to worry about calling the correct underlying SD card functions to remain complaint with the SD specification); it is not required in order to use the Pmod. The Reference Manual details was my 8+ years younger, more inexperienced, self's poor attempt at making the Pmod seem easy to use delving into the SD card specifications.

Regarding DAT2 and DAT3 and those sort of pins. Those are communication options as set forth by the SD Association that SD libraries would implement (basically meaning communicating over a single data channel, or communicating in parallel). There is no requirement to use SPI communication or a parallel style communication, it is up to user preference.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
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
×
×
  • Create New...