uSDHC init and polling mode questions

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

uSDHC init and polling mode questions

739 Views
yang104hong
Contributor II

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? 169407_169407.pngpastedImage_3.png

 

  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?

 169399_169399.pngpastedImage_1.png

 

  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

Labels (1)
Tags (2)
0 Kudos
0 Replies