Arduino MKR Zero external Micro SD card

I have been trying to get an external MircoSD card module to work with my Arduino MKR ZERO. I tried changing the SD library SPI pins based on this.

I changed the variant.h from this:

// Needed for SD library
#define SDCARD_SPI      SPI1
#define SDCARD_MISO_PIN PIN_SPI1_MISO
#define SDCARD_MOSI_PIN PIN_SPI1_MOSI
#define SDCARD_SCK_PIN  PIN_SPI1_SCK
#define SDCARD_SS_PIN   PIN_SPI1_SS

To this:

// Needed for SD library
#define SDCARD_SPI      SPI
#define SDCARD_MISO_PIN PIN_SPI_MISO
#define SDCARD_MOSI_PIN PIN_SPI_MOSI
#define SDCARD_SCK_PIN  PIN_SPI_SCK
#define SDCARD_SS_PIN   PIN_SPI_SS

and it didn't work no matter what I tried. I always get initialization failed.

only comment out the SDCARD_ defines from variant.h

Commenting them out doesn't help, I still get the initialization failed.

then the problem is somewhere else

Do you have any idea what could it be then ? I haven't changed anything anywhere else beside this and startup file where I defined CRYSTALLESS. I'm using it without the external 32.768 Khz crystal and It runs any other program just fine.

it is a custom board? try it first with normal MKR Zero. there are enough problems with SD card wiring to an established board

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.