AnsweredAssumed Answered

uSDHC init and polling mode questions

Question asked by Yang Hong on Nov 13, 2016

Hello,

 

I am confused about uSDHC init and polling mode setting.

 

  1. When I run the    Init_SD_Card(psdinfo, dat_width);

It will stuck at CMD13

But when I use [step into] or [step over] to run, I can go through CMD13 successfully.

Why? 

 

  1. Based on [step into] CMD13 successfully, when I enter    esdhc_polling_mode(&sdinfo, BIT_MODE); 

CMD25_Polling_MWBlock(psdinfo, blk_size,(uint32_t*)Sdram2SdcAddr);

It will have an CRC error. And after run CMD25, it didn't come back to tran state.

Why?

 

 

  1. About question 2, is it related to the SD card format settings?

The code is now ALIGN_32_BYTE, and the SD card is now 8 byte align when did format settings.

  

 

Thanks a lot.

 

HONG Yang

2016.11.14

 

Martin Kovar

Original Attachment has been moved to: code.7z.zip

Outcomes