MKR and SD CardReader not working

Hello everyone,
My original language is French, this is a machine translation.

Here is my problem: I would like to connect an SD cart reader to an MKR 1010 WIFI.
To test I tried to add an MKR ETH SHIELD

and for the code, I used the example "CardInfo" by specifying "chipSelect = 4"

but I systematically got an error message .

Does anyone have a solution?
thanks in advance

are you sure you inserted the card the right way?

the card is inserted that way. the card reader does not allow you to put the card in another way

I've also been having problems reading an SD card on the MKR Eth shield on a MKR Zero. The card works on the MKR Zero's slot, but not on the shield's slot. The chip select is changed to point to the desired slot. This works when using a Mega2560 and Ethernet Shield 2. I think the issue is the MKR zero has two SPI busses, one of which is dedicated to the SD card, and the other one that is brought out to the header pins. The SPI library and Ethernet library do not seem to account for this. Setting the enable pin for the ethernet controller HIGH to avoid bus contention does not help, so something is missing in dealing with the two SPI busses. Any hints appreciated.

the MKR Zero has SD card pins defined in board variant and the SD library uses always those

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