greiman / SdFat

Arduino FAT16/FAT32 exFAT Library
MIT License
1.07k stars 503 forks source link

SD initialization failed error on STM32 F303K8 Nucleo board #242

Open edriyin1 opened 3 years ago

edriyin1 commented 3 years ago

Hello there, I'm getting same error on every time. I can use my SD cards and SD card adapters in Arduino Micro flawlessly. But this time I need to use STM32F303K8. I have 2 types of adapters which is with logic level converter and not. Board only have one SPI output.

My pin connections are:

MOSI ---> PA_7 MISO ---> PA_6 SCLK ---> PA_5 CS ----> PA_4

Error Code when using SdInfo:

errorCode: 0x1, errorData: 0xff

Maybe useful notes:

I have spare Bluepills with STM32F103C8T6 and I'm getting same error when I try to use with it.

SD adapter with logic shifter: https://robotdyn.com/sd-microsd-card-high-speed-module.html

SD adapter without logic shifter: https://tr.aliexpress.com/item/2046499166.html?spm=a2g0o.productlist.0.0.784b3de851Azja&algo_pvid=9ab76246-39ce-4549-82b0-abcc0b274a04&algo_expid=9ab76246-39ce-4549-82b0-abcc0b274a04-1&btsid=0b0a556816099800113688514e9d12&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

greiman commented 3 years ago

I use the module without level shifters on STM32 and it works for me on STM32F103. I can't help since I don't have your hardware.