Does SD card interface work on 208 pin LPC54608?

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

Does SD card interface work on 208 pin LPC54608?

Jump to solution
1,033 Views
padraig_fogarty
Contributor III

I'm trying to get the SD card interface working on an LPC54608 208 pin part. I'm aware of the errata regarding SD card interface 4-bit mode, and I have configured my device pins accordingly (as shown below).

However, the when I run the 'lpcxpresso54608_sdcard_polling' demo software on my target, it fails if I include the code which sets 4-bit mode; without 4-bit mode the SD card can be accessed correctly.

The same demo code work on my lpcxpresso demo hardware (180 pin device) so the code seems to be fine, which leaves me wondering if there is something extra that I need to do to get this to work on the 208 pin part?

// PIN CONFIGURATION DATA

/* clang-format off */
/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitPins_SDCARD:
- options: {callFromInitBoot: 'true', prefix: BOARD_, coreID: core0, enableClock: 'true'}
- pin_list:
  - {pin_num: '9', peripheral: SDIF, signal: SD_CMD, pin_signal: PIO2_4/ENET_TXD3/SD_CMD/FC1_TXD_SCL_MISO/CTIMER2_MAT1, mode: inactive, slew_rate: fast}
  - {pin_num: '12', peripheral: SDIF, signal: SD_POW_EN, pin_signal: PIO2_5/ENET_TX_ER/SD_POW_EN/FC1_CTS_SDA_SSEL0/CTIMER1_MAT2, mode: inactive}
  - {pin_num: '7', peripheral: SDIF, signal: SD_CLK, pin_signal: PIO2_3/ENET_TXD2/SD_CLK/FC1_RXD_SDA_MOSI/CTIMER2_MAT0, mode: inactive, slew_rate: fast}
  - {pin_num: '17', peripheral: SDIF, signal: 'SD_D, 0', pin_signal: PIO2_6/ENET_TX_CLK/SD_D(0)/FC1_RTS_SCL_SSEL1/CTIMER0_CAP0, mode: inactive, slew_rate: fast}
  - {pin_num: '29', peripheral: SDIF, signal: 'SD_D, 1', pin_signal: PIO2_7/ENET_COL/SD_D(1)/FREQME_GPIO_CLK_B/CTIMER0_CAP1, mode: inactive, slew_rate: fast}
  - {pin_num: '32', peripheral: SDIF, signal: 'SD_D, 2', pin_signal: PIO2_8/ENET_RXD2/SD_D(2)/CTIMER0_MAT0, mode: inactive, slew_rate: fast}
  - {pin_num: '36', peripheral: SDIF, signal: 'SD_D, 3', pin_signal: PIO2_9/ENET_RXD3/SD_D(3)/CTIMER0_MAT1, mode: inactive, slew_rate: fast}
  - {pin_num: '39', peripheral: SDIF, signal: SD_CARD_DET, pin_signal: PIO2_10/ENET_RX_ER/SD_CARD_DET_N}
  - {pin_num: '80', peripheral: SDIF, signal: 'SD_D, 5', pin_signal: PIO4_30/ENET_TX_CLK/SD_D(5)/CTIMER3_MAT0/FC1_RTS_SCL_SSEL1/CTIMER1_CAP3/EMC_D(25), slew_rate: fast}
  - {pin_num: '68', peripheral: SDIF, signal: 'SD_D, 6', pin_signal: PIO3_18/FC8_CTS_SDA_SSEL0/SD_D(6)/CTIMER4_MAT0/CAN0_TD/SCT0_OUT5, slew_rate: fast}
  - {pin_num: '44', peripheral: SDIF, signal: 'SD_D, 7', pin_signal: PIO3_19/FC8_RTS_SCL_SSEL1/SD_D(7)/CTIMER4_MAT1/CAN0_RD/SCT0_OUT6, slew_rate: fast}
  - {pin_num: '19', peripheral: SDIF, signal: 'SD_D, 4', pin_signal: PIO3_16/FC8_RXD_SDA_MOSI/SD_D(4), slew_rate: fast}
  - {pin_num: '46', peripheral: SDIF, signal: SD_CARD_INT, pin_signal: PIO3_20/FC9_SCK/SD_CARD_INT_N/CLKOUT/SCT0_OUT7}
  - {pin_num: '11', peripheral: SDIF, signal: SD_WR_PRT, pin_signal: PIO3_15/FC8_SCK/SD_WR_PRT, identifier: '', mode: pullDown}
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
 */
/* clang-format on */

Labels (5)
0 Kudos
1 Solution
750 Views
soledad
NXP Employee
NXP Employee

You don't need to connect the pins externally, but it is necessary  to program the IOCON registers to select the SD_[D4] to SD_D[7] functions and to enable the on-chip pull-up resistors onto 4 unused GPIO pins.

Have a great day,

Sol

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
750 Views
soledad
NXP Employee
NXP Employee

Hi, 

 

Please check the following thread, 

SDIO Errata + SDRAM on LPCXPRESSO 54608 Notice 

 

Have a great day,

Sol

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
750 Views
padraig_fogarty
Contributor III

I'm aware of the errata and the link you provided, however my configuration for the SD card does not use the SDRAM pins. I've also created a basic project which does not include any SDRAM module but the results are the same.

Does the errata require the unused pins (D[4:7]) to all be at a logic high level?

Because our design has external pull-down resistors on some of the SDIO pins (D[4:7]).

0 Kudos
751 Views
soledad
NXP Employee
NXP Employee

You don't need to connect the pins externally, but it is necessary  to program the IOCON registers to select the SD_[D4] to SD_D[7] functions and to enable the on-chip pull-up resistors onto 4 unused GPIO pins.

Have a great day,

Sol

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
750 Views
padraig_fogarty
Contributor III

I finally managed to resolve this problem by lifting the four I/O pins routed to SD_[D7:D4] from the PCB.

So for others, it might be worth clarifying that not only do these the four extra pins have to be assigned to SD, and configured with pull-ups, but any external load on these pins will most likely to make the interface inoperable.

regards

Padraig

0 Kudos
750 Views
soledad
NXP Employee
NXP Employee

Hi, 

Please check the following thread, 

SDIO Errata + SDRAM on LPCXPRESSO 54608 Notice 

Have a great day,

Sol

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos