AnsweredAssumed Answered

Configuration of simple DMA for uSDHC

Question asked by Walter Zimmer on Feb 4, 2019
Latest reply on Feb 11, 2019 by Walter Zimmer

Situation:

To access uSD cards I plan to use 4bit wide uSDHC on iMXRT1052. (more precisely I try to port MK66 driver to iMXRT1052). I restrict myself to read/write 512byte blocks. I can initialize the uSD card using the standard commands.

 

Problem: block read/write do not work properly.

Symptoms: while on MK66 DMA read and write transfer 128 32bit data  (512 bytes), on the iMXRT1052 129 int32 words are transferred (i.e. 1 32 bit word more) . This seems to be some sort of CRC, but a weird one as all 4 bytes in this additional word are equal. It is not clear how this "CRC" is estimated.

The fact that 129 words are transferred is verified by the DMA_System Address.

 

While reading a uSD block and ignoring the 129th word is no issue, the write operation is nearly impossible, without the proper "CRC" generation. I noted also that sending any word to the uSD card results that uSD card ignores the just written block, confirming my suspicion that the 129th word is a "CRC".

 

Interestingly the Kinetis MK66 does not require the addition of this "CRC word.

 

Possible solution: switch off the CRC checking, but what is the command to tell the uSD not to send and receive a 32bit "CRC" word? 

 

Edit: Alternative Question: what is the right command sequence to tell IMXRT1052 to handle CRC in background (on its own, or automatically)?

Outcomes