Connecting with SD card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connecting with SD card

718 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Map on Sun Oct 21 06:21:05 MST 2012
I am struggling with how to connect SD Card using mini SUN7 LPV1788 ARM Cortex M3 with LCD touch screen. I would like to read and write a recorded MP3 file into an SD card. It is a project. The task is to record voices through a microphone and write them into an SD Card. The problem is I don't have any example codes which are compatible with the mentioned model. Would anyone send me a code which works or is compatible for that? Thank you in advance.
Labels (1)
0 Kudos
5 Replies

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Tue Oct 23 13:02:18 MST 2012
Okay, I took a look at the schematic - it shows the SD card is connected to the SPI bus, and that there is no GPIO input to indicate that the card is present or not...

The MCI example code won't work here, because the card is connected to the SPI bus, not the MCI bus...

You are going to have to write a driver for the SPI bus, and then you are going to need to either write a FS or use one like Chan's to talk to the drive.

Notice that the SPI bus is #1, so your pin configuration should look something like this:

<code>
   // pin configuration...
   LPC_IOCON->P4_20  |= 3;                      // SSP1_SCLK
   LPC_GPIO1->DIR |= (1<<12);                   // SD \CS 
   LPC_GPIO1->SET |= (1<<12);                   // ...     
   LPC_IOCON->P4_22  |= 3;                      // SSP1_MISO
   LPC_IOCON->P4_23  |= 3;                      // SSP1_MOSI

</code>
0 Kudos

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Map on Tue Oct 23 10:17:05 MST 2012
Thank you Mr.Dave ,very appreciate . :)

this file is schematic.
0 Kudos

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Tue Oct 23 09:32:54 MST 2012
Perhaps you can upload the schematics?  I'll have a look at them and see if I can help.
0 Kudos

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Map on Tue Oct 23 02:07:27 MST 2012
please anyone help me!!!
0 Kudos

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by barumba on Sun Oct 21 19:10:06 MST 2012
Did you mean mini SUN7 LPC1788 ARM Cortex M3 model? I have the same problem about connecting with Micro SD card.
I have mini SUN7 LPC1788 ARM Cortex M3 Rev.D model (Picture in Attach File) and try to use the MCI example code for lpc177x_8x but it's replied "No CARD is being plugged, Please check!!!". Even if Micro SD Card is in slot. Has someone have the solution for solve this problems?  Thanks in advance.
(I tried to setting _CURR_USING_BRD macro to any board type in bsp.h but have the same result)
0 Kudos