AnsweredAssumed Answered

LPC18xx SDMMC, ACMD51 or CMD6 Reply

Question asked by Roman Leonov on Aug 20, 2019
Latest reply on Aug 22, 2019 by Roman Leonov

Hi!

I try to get SD Configuration register answer (ACMD51) or SWITCH CONFIG (CMD6) reply on LPC18xx (LPC1822, LPC1837 or LPC43xx, all the same).

 

Unfortunatelly, I have a problem here, because 512 bytes of data (READ/WRITE SINGLE BLOCK) works well for me.

But when I try to get less data than 512 bytes "Data Transfer Over" Interrupt not follow then. 

 

So, I set BLKSIZ, FIFOTH and BYTCNT registers to get 8 bytes (64 bits) reply for SD configuration register. 

And I can see reply throw analyzer, but there is no IRQ then in my software. So I can't get reply data from FIFO.

 

Here my settings:

LPC_SDMMC->BLKSIZ = 1; // 1 byte for block

 

/* RX_WMark = 0, TX_WMark = 15 (doesn't matter in rx mode i think) and MSize = 1 transfer */

LPC_SDMMC->FIFOTH = (15 << SDMMC_FIFOTH_TX_WMARK_Pos) | 
(0 << SDMMC_FIFOTH_RX_WMARK_Pos) | 
SDMMC_FIFOTH_DMA_MTS_1;

 

/* then i configure sdmmc descriptor to receive 8 bytes of data. One chain descriptor */

LPC_SDMMC->BYTCNT = 8; // 8 bytes for recieption

 

/* then i send ACMD51 command */

But there is no IRQ.

 

Does someone tryed to get reply for ACMD51 or CMD6 sdmmc command on LPC18xx?

Maybe without DMA, just read data straight from FIFO.

Outcomes