kendryte / kendryte-standalone-demo

Demo of kendryte k210 standalone SDK
https://github.com/kendryte/kendryte-standalone-sdk
229 stars 97 forks source link

How to use micro sd card? - sd_init function failed #44

Open EunseongBoo opened 4 years ago

EunseongBoo commented 4 years ago

Hello, I'm trying to read some files from micro sd card on Sipeed MAix Go Suit for RISC-V AI+IoT board. However, the below errors occurred in sd_init function when I build and execute the sd_card demo in the repo.

--- forcing DTR inactive --- forcing RTS inactive --- Miniterm on /dev/ttyUSB1 115200,8,N,1 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- SD_CMD8 is FF sd init 255
SD card err
W (22141437268) SYSCALL: sys_exit called by core 0 with 0x1

My questions are:

  1. Does the sd card demo not support micro sd cards?
  2. Are there any other solutions to read micro sd cards?

Thanks!

Forty-Bot commented 3 years ago

Did you adjust the pins in main.c? AFAIK all the demos here assume they run on a KD233.

SKTT1Ryze commented 3 years ago

I have the same problem that the sdcard init failed.
And for the @Forty-Bot 's answer, can you give more details about adjusting the pins in main.c?

Forty-Bot commented 3 years ago

just set the pins in io_mux_init to what they should be for your board

SKTT1Ryze commented 3 years ago

It works, thanks. @Forty-Bot