eSDHC on the P1021

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

eSDHC on the P1021

Jump to solution
1,612 Views
mrhicks
Contributor II

Hello,

  I am starting out to developed a device driver for the eSDHC peripheral on the P1021.  In section 16.6.2.1 Card Detect of the P1021 QorIQ Integrated Processor Reference Manual (Document Number: P1021RM, Rev. 5, 06/2011), it outlines what is needed to initialize the hardware in order to detect a card insertion (card detect).  Unfortunately, I am unable to get this working, so I have a few questions and observations of what I am seeing.

  As a general statement, I perform a reset of the controller by setting SYSCTL[RSTA] and wait for it to clear.  Next, the clock is set as close as possible to 400 KHz.  In addition, I am using the P1021 Moduled Development System Processor Board (P1021-MDS-PB) as my current target.

1) It seems that when I have IRQSIGEN[CINSIEN] set, I am seeing a constantly interrupt generated.  During the service routine handler, the IRQSTAT register is read and then written back to clear the interrupts, but I don't see this flag (IRQSTAT[CINS]) every get cleared, why????

2) What is odd, is that I am seeing an IRQSTAT[CINS] interrupt even when there is not card present in the system, how can that be??

3) During the configuration, both Card Insert and Card Removal events for the Interrupt Status Enable, IRQSIGEN, and Interrupt Signal Enable , IRQSTATEN, are configured (i.e., set to '1').  I never see a Card Removal even when I insert the card and remove it. 

4) I don't understand why there is a Interrupt Status Enable and Interrupt Signal Enable registers?  Is the Interrupt Status Enable meant to be use for a system that will implement polling of the Interrupt Status (IRQSTAT) register?  If that is the case, if I were to use interrupts then I shouldn't need to configure the Interrupt Status Enable register at all, right?  Are they meant to be used in a mutual exclusive manner?

5) I have tried using interrupts, via the IRQSIGEN register, and a polling mechanism, via the IRQSTATEN, but can't can't seem to get them to work properly.  I am always seeing a Card Insertion event that never clears and occurs even when there is not card in the system.

6) Is there another peripheral that I need to configure or register(s) somewhere in order to use the eSDHC peripheral?  For example, does the eSDHC use one of the QUICCK engines which I need to configure?

Thanks,

Mark

Labels (1)
Tags (2)
0 Kudos
1 Solution
1,299 Views
mrhicks
Contributor II

Hello,

  I contacted Freescale technical support and they were kind enough to tell me there is an issue with the P1021-MDS-PB development board.  From the errata, it states: "SD Card cannot be dynamically detected by the controller as the SD_CD pin from the connector are not connected to the controller".

Regards,

Mark

View solution in original post

0 Kudos
2 Replies
1,300 Views
mrhicks
Contributor II

Hello,

  I contacted Freescale technical support and they were kind enough to tell me there is an issue with the P1021-MDS-PB development board.  From the errata, it states: "SD Card cannot be dynamically detected by the controller as the SD_CD pin from the connector are not connected to the controller".

Regards,

Mark

0 Kudos
1,299 Views
mrhicks
Contributor II

Hello,

  Just to provide an update, I did make sure the GUTS_PMUXCR[SDHC_CD] and GUTS_PMUXCR[SDHC_WP] are  set to '1' as these pins have alternate functions.  In addition, I configure the clock frequency to be as close to 400 kHz as possible.  I am still unable to get this functionality working.  Any help is greatly appreciated.

Regards,

Mark

0 Kudos