LPC55S69 SD Card Interface Selection In SW Examples

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

LPC55S69 SD Card Interface Selection In SW Examples

1,212 Views
chrisgulick
Contributor II

Hello,

I am using the LPC55S69 MCU and would like to set the sd card interface to card 1.

The sw example usb_device_msc_sdcard assumes card interface 0. I have looked thru source files and headers for perhaps an #define for setting SD Card interface selecting either 0 or 1. I have not had any success in finding a  way to set the interface to 1. Are the sd card examples hardcoded for interface 0 or is there a way to specify interface 1.

Something like #define CardInterface 0 or #define CardInterface 1. If you would kindly direct me to the file and line number that accomplishes this I would greatly appreciate it.

Thank you

Labels (1)
0 Kudos
3 Replies

1,082 Views
pstrauss
Contributor I

Hi Chris,

Did you get a solution to this problem?  I have the same one and need a fix urgently.  I found an APP note AN12777 with accompanying software, that is about using both cards.  I understand that there is no simple setting change to accomplish the swap.  The SDK composite example I am using has various SD card functions that work fine.  The app note software includes corresponding functions tailored to SD1.  I tried adding all of them to the appropriate driver files and then replacing the call to initialize SD0 with the SD1 version, which in turn calls all of the other SD1 versions.  Tracing the code execution suggests that the concept is working, but if hangs waiting in a loop that is looking for a command issued to SD1 to complete.

Thanks, Peter

0 Kudos

581 Views
OnsL
Contributor I

hello 

Did anyone found a fix to this situation coz im also stuck with sd0 and i couldn' t find how to activate sd1 instead though all sd1 pins are activated but my code is  still unable to detect the presence of the sd card on the sd1 inhterface.

im working on lpc55s28 and my code is based on the SDK_2_12_0_LPC55S28

0 Kudos

1,115 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Chris,

Pls refer to the following section in UM11126.pdf, the LPC55S6x just has ONE SDMMC module although it has two device interfaces SD0 and SD1. In other words, if you use SD0 interface, just assign the SD0 pin as SDMMC, if you use SD1, just assign SD1 pins as SDMMC, it is okay.

If you use the SD0 or SD1 interface, furthermore, you just need to change the following registers:

///////////////////////////////////////

Configure SD0 and/or SD1 in the following registers:
– PWREN register.
– CLKENA register.
– CTYPE when switching between 1-bit and 4-bit modes.
– When sending commands, bits 20-16 of the CMD register must be programmed
with 0 or 1 for SD0 or SD1 respectively

////////////////////////////////////////

For the Code lpcxpresso55s69_dev_msc_sdcard_freertos project, it matches with the LPC55S69-EVK board, it just use SD0 interface. If you use SD1, you need to modify the above register in the code.

Hope it can help you

BR

Xiangjun Rong

pastedImage_1.png

0 Kudos