Using the zephyr RTOS I currently want to acces filesystem on a SD card. I wired it correctly and used this example to getting started: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/fs/fs_sample
The log returns follwowing error:
[00:00:03.463,989] <inf> sd: Detected SD card
[00:00:05.601,104] <err> sd: Card never left busy state
[00:00:05.601,135] <err> sd: Card init failed
[00:00:05.601,165] <err> main: Storage init ERROR!
Hence, I wired my Logic to get some more details
There is definitely some communication, but not as described here: http://elm-chan.org/docs/mmc/mmc_e.html.
Here are the first commands:
name type start_time duration mosi miso
SPI result 1.0015495 3.05e-05 0x40 0xFF
SPI result 1.00158175 3.05e-05 0x00 0xFF
SPI result 1.001614 3.05e-05 0x00 0xFF
SPI result 1.00164625 3.075e-05 0x00 0xFF
SPI result 1.00167875 3.05e-05 0x00 0xFF
SPI result 1.001711 3.05e-05 0x95 0xFF
SPI result 1.0017435 3.05e-05 0xFF 0xFF
SPI result 1.00177575 3.05e-05 0xFF 0x01
SPI result 1.001808 3.05e-05 0xFF 0xFF
SPI result 1.00184025 3.075e-05 0xFF 0xFF
SPI result 1.00187275 3.05e-05 0xFF 0xFF
SPI result 1.001905 3.05e-05 0xFF 0xFF
SPI result 1.00193725 3.05e-05 0xFF 0xFF
SPI result 1.0019695 3.05e-05 0xFF 0xFF
SPI result 1.00200175 3.075e-05 0xFF 0xFF
SPI result 1.00203425 3.05e-05 0xFF 0xFF
SPI result 1.0020665 3.05e-05 0xFF 0xFF
SPI result 1.00209875 3.05e-05 0xFF 0xFF
SPI result 1.00213125 3.05e-05 0xFF 0xFF
SPI result 1.0021635 3.05e-05 0xFF 0xFF
I doubt that the correct frequency is not set properly. But cannot figure out, where it should be.
I formatted the SD card to FAT many time. Always getting the same result.