SDBlockDevice -5005 error on init

As per the title, trying to init an sd card so I can read to it, getting -5005 errors at runtime (on nuculeo f429zi)

Tried different boards, sd cards and formatted multiple times.

Cant find any documentation on this issue, either official or not

     SDBlockDevice* sdcard = new SDBlockDevice(PB_5, PB_4, PB_3, PF_3);

    printf("Starting write...\n");
    int err;

    if ( 0 != err) {
        printf("Init failed %d\n",err);
        return -1;

This is the relevant section of code


the description of this error code is here.

#define SD_BLOCK_DEVICE_ERROR_NO_DEVICE          -5005  /*!< device is missing or not connected */

BR, Jan

1 Like

I tried that with my Nucleo-F429ZI on same pins, under MbedOS 6.15.1. It seems to be OK and this error code really occurs only when the SD card is not present. So from my point of view, you have a bad contact somewhere or bad wiring.

BR, Jan

Thanks for the reply, I think thats the problem then thanks