I try to connect a micro-SD card to MKR IoT Carrier rev2 with powered by MKRZero.
The MKRZero has a builtin micro-SD card holder on dedicated SPI (which works well with my SD car) but it is not very accessible when plugged on the carrier.
By default the SD_CS pin is D0 in Arduino_MKRIoTCarrier and it is confirmed by data sheet and schematics.
But it's not working at all when SD library is initialized. I've also tried the D4 pin which is the one free SPI SS pin on MKRZero without any success and also the 28th digital pin which is the SPI1 SS pin (the one dedicated to the MKRZero SD card holder).
Does any one which also use the MKRZero over MKRIoTCarrier rev2 or 1 succeed to use the SD card holder located on the carrier ?
Is there any specialist of these electronics which may explain me and community whether there is an incompatibility between MKRZero and MKRIoTCarrier.
the SD library will only use the SD card holder on MKR Zero.
if you want to use SD card on a shield you have to select a different MKR model in the Tools menu
Thanks for your reply, it put me in the way of the solution.
I have redefined the four here-after constants in the file <Arduino path>/libraries/SD/src/utility/Sd2Card.h, just after inclusion of Arduino.h (which first defines the SDCARD pins for MKRZero variant):
I don't know the side effects of selecting another board.
As they are based on same chip, the program will probably execute but initialization may be done with differents values.