This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SDHost with CLK on PIN 01 not working



Hi,

i'm clearly missing something here. My SD card is working without problems using following pin configuration:

	//
	// Configure PIN_06 for SDHost0 SDCARD_DATA
	//
	PinTypeSDHost(PIN_06, PIN_MODE_8);

	//
	// Configure PIN_07 for SDHost0 SDCARD_CLK
	//
	PinTypeSDHost(PIN_07, PIN_MODE_8);

	//
	// Configure PIN_08 for SDHost0 SDCARD_CMD
	//
	PinTypeSDHost(PIN_08, PIN_MODE_8);

	//
	// Set the SD card clock as output pin
	//
	MAP_PinDirModeSet(PIN_07, PIN_DIR_MODE_OUT);

	//
	// Enable Pull up on data
	//
	MAP_PinConfigSet(PIN_06, PIN_STRENGTH_4MA, PIN_TYPE_STD_PU);

	//
	// Enable Pull up on CMD
	//
	MAP_PinConfigSet(PIN_08, PIN_STRENGTH_4MA, PIN_TYPE_STD_PU);

But if i change PIN 07 to PIN 01 as suggested by pinmux tool it stops working:

	//
	// Configure PIN_01 for SDHost0 SDCARD_CLK
	//
	PinTypeSDHost(PIN_01, PIN_MODE_6);

Is it possible to use PIN 01 as SDHost CLK while connected via USB? Or maybe there is a problem with the onboard LED?

Hopefully someone can point me in the right direction. Thanks in advance!

My full pinmux config if it matters:

	//
	// Enable Peripheral Clocks
	//
	PRCMPeripheralClkEnable(PRCM_GPIOA0, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_GPIOA2, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_GPIOA3, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_SDHOST, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_GSPI, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_UARTA1, PRCM_RUN_MODE_CLK);
	PRCMPeripheralClkEnable(PRCM_I2CA0, PRCM_RUN_MODE_CLK);

	//
	// Configure PIN_50 for GPIO Output
	//
	PinTypeGPIO(PIN_50, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA0_BASE, 0x1, GPIO_DIR_MODE_OUT);

	//
	// Configure PIN_58 for GPIO Input
	//
	PinTypeGPIO(PIN_58, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA0_BASE, 0x8, GPIO_DIR_MODE_IN);

	//
	// Configure PIN_59 for GPIO Input
	//
	PinTypeGPIO(PIN_59, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA0_BASE, 0x10, GPIO_DIR_MODE_IN);

	//
	// Configure PIN_60 for GPIO Input
	//
	PinTypeGPIO(PIN_60, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA0_BASE, 0x20, GPIO_DIR_MODE_IN);

	//
	// Configure PIN_61 for GPIO Input
	//
	PinTypeGPIO(PIN_61, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA0_BASE, 0x40, GPIO_DIR_MODE_IN);

	//
	// Configure PIN_62 for GPIO Output
	//
	PinTypeGPIO(PIN_62, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA0_BASE, 0x80, GPIO_DIR_MODE_OUT);

	//
	// Configure PIN_63 for GPIO Output
	//
	PinTypeGPIO(PIN_63, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA1_BASE, 0x1, GPIO_DIR_MODE_OUT);

	//
	// Configure PIN_64 for GPIO Output
	//
	PinTypeGPIO(PIN_64, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA1_BASE, 0x2, GPIO_DIR_MODE_OUT);

	//
	// Configure PIN_15 for GPIO Input
	//
	PinTypeGPIO(PIN_15, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA2_BASE, 0x40, GPIO_DIR_MODE_IN);

	//
	// Configure PIN_18 for GPIO Input
	//
	PinTypeGPIO(PIN_18, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA3_BASE, 0x10, GPIO_DIR_MODE_IN);

	//
	// Configure PIN_21 for GPIO Output
	//
	PinTypeGPIO(PIN_21, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA3_BASE, 0x2, GPIO_DIR_MODE_OUT);

	//
	// Configure PIN_53 for GPIO Input
	//
	PinTypeGPIO(PIN_53, PIN_MODE_0, false);
	GPIODirModeSet(GPIOA3_BASE, 0x40, GPIO_DIR_MODE_IN);

	//
	// Configure PIN_06 for SDHost0 SDCARD_DATA
	//
	PinTypeSDHost(PIN_06, PIN_MODE_8);

	//
	// Configure PIN_01 for SDHost0 SDCARD_CLK
	//
	PinTypeSDHost(PIN_01, PIN_MODE_6);

	//
	// Configure PIN_08 for SDHost0 SDCARD_CMD
	//
	PinTypeSDHost(PIN_08, PIN_MODE_8);

	//
	// Configure PIN_45 for SPI0 GSPI_CLK
	//
	PinTypeSPI(PIN_45, PIN_MODE_7);

	//
	// Configure PIN_07 for SPI0 GSPI_MOSI
	//
	PinTypeSPI(PIN_07, PIN_MODE_7);

	//
	// Configure PIN_03 for UART0 UART0_TX
	//
	PinTypeUART(PIN_03, PIN_MODE_7);

	//
	// Configure PIN_57 for UART0 UART0_RX
	//
	PinTypeUART(PIN_57, PIN_MODE_3);

	//
	// Configure PIN_55 for UART1 UART1_TX
	//
	PinTypeUART(PIN_55, PIN_MODE_6);

	//
	// Configure PIN_02 for UART1 UART1_RX
	//
	PinTypeUART(PIN_02, PIN_MODE_7);

	//
	// Configure PIN_05 for I2C0 I2C_SCL
	//
	PinTypeI2C(PIN_05, PIN_MODE_5);

	//
	// Configure PIN_04 for I2C0 I2C_SDA
	//
	PinTypeI2C(PIN_04, PIN_MODE_5);

  • Currently i can't say why, but PIN 01 needs (allthought PIN 07 doesn't) do be configured using pull up.
    Inserting this line solved the problem:

    MAP_PinConfigSet(PIN_01, PIN_STRENGTH_4MA, PIN_TYPE_STD_PU);

    Allthough it is working now, i would appreciate if someone could explain why this is needed. Thanks in advance.
  • Thank you so much for this finding. It just saves me.

    I noticed that PIN_01 is also connected SCL on LAUNCHHXLA board. It is also pulled down on via R120 on the LED section. Actually, this applies to PIN02 and PIN64 which are alternative SDHost pins as well. So I believe J2, J3 and J4 should be removed and PIN_01 needs internal pull up as well (just like the DATA and CMD lines). 

    I am not sure removing the pull down on LED part would help, but do hope TI engineers would look into this problem and revise the design.