AnsweredAssumed Answered

SDHC - How to properly terminate a Multi-Sector Read

Question asked by joe hinkle on Jul 21, 2018

I've implemented Multi-Sector read - CMD18

 

I'm not using the AutoCmd12 capability because I could never get it to work so I want to understand and implement it the manual way.

 

My understanding is that CMD18 is issued and the card starts dumping sectors.

 

I set SDHC_BLKATTR to the the number of sectors and 512 bytes.

 

I read 512 byte blocks until I have acquired the number of wanted sectors.

 

I issue a CMD12 to tell the card to stop sending data.

 

NOW - my issue - I can't get the SDHC to report data transfer complete.

 

SDHC_PRSSTAT never has SDHC_PRSSTAT_RTA_MASK,  SDHC_PRSSTAT_DLA_MASK, or SDHC_PRSSTAT_CDIHB_MASK as ZERO --- always showing the data transfer incomplete.

 

I've tried dummy reads after CMD12 -- that works sometime - but not always.

 

Can someone please identify the proper code to manually terminate CMD18?

 

Thanks.

 

Joe

Outcomes