AnsweredAssumed Answered

K66F sdhc stat/interrupt registers won't indicate card detected

Question asked by Dinakar Kondru on Aug 9, 2017
Latest reply on Aug 23, 2017 by Dinakar Kondru

Hi,

 

I do the following sequence (psuedo code):

  

    BOARD_InitPins();

    BOARD_BootClockRUN();

    BOARD_InitDebugConsole();

    SIM_SCGC3.SDHC_clockgate_control.enable;

    SDHC_SYSCTL.IPGEN.enabled;

    SDHC_SYSCTL.HCKEN.enabled;

    SDHC_SYSCTL.PEREN.enabled;

    SDHC_SYSCTL.SDCLKEN.enabled;

    SDHC_IRQSTATEN.ALL_BITS.enabled;

    

   while (1) {

   read_and_print_SDHC_IRQSTAT();

   read_and_print_SDHC_PRSSTAT();

  }

  

Basically I initialize pins, clock and enable sdhc clock and enable interrrupts.

 

 I ran the above code and I inserted the SD card. The SD card has an LED on it and it goes ON. But, the IRQSTAT and PRSSTAT don't indicate that the card is detected.

 

The example code provided along with KDS for SDHC  is based on gpio and not on the actual SD card interface so I'm not sure what I'm missing.

 

Any help is greatly appreciated.

 

Thanks,

Dinakar

 

Outcomes