embeddedsw icon indicating copy to clipboard operation
embeddedsw copied to clipboard

Fallbackmode for SD card init failed

Open maldag opened this issue 2 years ago • 1 comments

Referring to the following issues and the following error using fsbl code with sd cards:

  • https://support.xilinx.com/s/question/0D52E00006hpiTJSAY/high-speed-sd-card-cant-finish-initialization-during-fbsl-and-uboot?language=en_US
  • https://support.xilinx.com/s/question/0D52E00006hpTekSAE/zynq-fsbl-cannot-read-bootbin-from-sd-card?language=en_US
Boot mode is SD
SD: rc= 0
SD: Unable to open file BOOT.BIN: 3
SD_INIT_FAIL
FSBL Status = 0xA009

Due to the prompt and looking at the code an issue could arise in trying to switch to another sd card speed in call XSdPS_Change_BusSpeed(). If there might be an error communicating with the card it might be an idea to implement a fallback mode which would not change the busspeed and stays with 25 MHz after it detected the error in switching speeds.

Would this be an idea to make this fsbl code more robust?

maldag avatar Aug 31 '23 06:08 maldag

Hi @maldag - FSBL application has to know the error is because of XSdPS_Change_BusSpeed() function failure to ignore the error and fallback to Low Speed mode. In File System cases all the errors coming from the low level SD driver will be converted to a file system(xilffs) related errors, so FSBL doesn't know the actual error returned by the driver. So, this cannot be possible in file system use case.

saikrishnapotthuri avatar Sep 04 '23 11:09 saikrishnapotthuri