AnsweredAssumed Answered

BF518 SD interface

Question asked by mantur on Aug 2, 2016
Latest reply on Aug 11, 2016 by Jithul_Janardhanan

Hello,
I have built a CMOS camera based on BF518 and a CMOS sensor, all work fine but as last develope I have written the code for enabling the SD interface.

xCAM_SD_1s.jpg

For this work I copy the source example available with ADSP-BF518F EZ-Board. In my code the SD identification work fine but when I start a simple test of write/read doesn't work.
The program fail with the function sd_mmc_select()

Below the program log:

 

 

Card inserted

Waiting for card to be detected...

  Card identification must be run at 400000Hz or less

  Setting RSI clock frequency to 400000Hz

Starting card identification procedure

  Sending GO_IDLE_STATE command

Starting SD Version 2.0 identification...

  Sending SEND_IF_COND command for 2.7V to 3.6V compatibility

  Card is compatible, likely an SD Version 2.0 compliant card...

  Voltage range was accepted, checking echo back pattern...

  Echo back pattern correct

  Requesting OCR register...

  OCR register received

  Requesting OCR register...

  OCR register received

  Checking if card is a high capacity card...

SD Version 2.0 or later High Capacity card detected successfully!

  Requesting CID register...

  Requesting RCA...

  RCA of 0x0001 sent from card

  Requesting Card Status register...

  Requesting CSD register...

  Requesting SCR register...

  Optimizing RSI interface speed...

  SD Card transfer speed is 25000000Hz

  Setting RSI clock frequency to 20000000Hz

  Setting RSI bus width to 4-bit...

  Requesting SSR register...

Card identification procedure completed! *pRSI_STATUS = 20a000

sd_mmc_send_command 1

 

R/W Test begin ...Bus width = 4, Card = 2, Er = 20a004

Error on sd_mmc_select.

*pRSI_STATUS = 20a004

 

I understand the complexity of it and the little information, but now they are at a standstill, between my code and the EZ-Board, there are no differences.

Where can I find some additional resources or a different testing program?

Thank you in advance.
Manuele

 

2016/08/11 I have found a preliminary solution by analyzing rsi.c source code for BF609, unfortunately also this code have problems with several kind of Secure Digital cards. I have a large collection of SD cards and only 10% works with this driver. I hope that ADI resolve this problem that is a severe limit for this DSP.
Manuele

Outcomes