I’m reasonably sure that the SD card slot is malfunctioning and my device will need to be replaced. Before we start, I’ve read both threads for similar problems.
The card in question is a SanDisk Ultra 16 GB microSDHC class 10.
Here is the timeline of events and my troubleshooting steps:
- Originally formatted card to FAT32 with macOS Disk Utility and used
Arduino_Due_SD_HSMCI
example code to build a program which writes to SD card. - Yesterday, while debugging, I mounted the card to my laptop and deleted, confirming that the M2 could indeed write to the card.
- Today, every time I attempt to run my program I see:
MS: Cannot initialize the SD card: MS: Card is unusable, try another one
- I mounted the card on my laptop again and confirmed I could write, eject, insert, and read the previously written file.
- I removed the SuperB. Still the same error.
- I reformatted the card again via Disk Utility in the following combinations: MBR FAT32, MBR ExFAT, GPT FAT32, GPT ExFAT. Each yielded the same error.
- I erased, unplugged, and flashed
DataLogger_dif
from theArduino_Due_SD_HSMCI
examples and tried again with each of the formats from (4). Each still yielded the same error. - As per one of the previous threads, I downloaded the official SD Card Formatter from the SD Association and formatted the card with the
Overwrite Format
option. Still received the same error. - I printed out
digitalRead(SD_SW)
with the card in the slot which readLOW
, confirming that the SD switch is active. - This time I attempted to run
DataLogger_dif
with no SD card inserted. Assuming the SD slot is functioning correctly and my understanding ofArduino_Due_SD_HSMCI
is correct, I would expect to see an error such as:
However, I again see:MS: Cannot initialize the SD card: MS: Card not found
MS: Cannot initialize the SD card: MS: Card is unusable, try another one
This leads me to reasonable conclude there is a hardware issue with the SD functionality on my M2. The only troubleshooting effort I have not made is to attempt another card. I currently only have this card and two 128GB cards, which I’ve heard will not work with the M2. I would have to go buy a replacement card to test this. However, during the entire troubleshooting experience, I have still been able to mount, read, and write to the SD card from macOS.