Open simon88 opened 2 years ago
I can't help since it is not a true SD. Contact Adafruit and use their SD library.
@greiman Yes it' not a true SD but it's like an SD card so I don't know if it change something or not. But I've used your library to read/wrtite everything works perfectly, it's only the formatter has bricked my card
I suspect you should never format the card since it is pre-formatted. Maybe this card does not support formatting with the SD standard format.
The flash and buffer layout for cards is specified by the SD Association and I use the SD standard layout for cards.
Contact Adafruit - I only have internal info for cards that comply with the SD Association Standard.
Ok nice thanks for your help
Just for information , I've contacted the manufacturer of the device, and here is that answer
Our SD NAND default is format FAT16. Our SD NAND is the same as the micron SD card. So you can use the SD card format method, like Windows OS hard disk format. thanks!
What type board/cpu are you using? The errors look like SPI hardware failures.
The SdFormatter uses the highest speed possible and dedicated SPI. Some SAMD and ESP boards require a slower speed and shared SPI.
Try editing these settings in SdFormatter:
// Try max SPI clock for an SD. Reduce SPI_CLOCK if errors occur.
#define SPI_CLOCK SD_SCK_MHZ(50) // <<--------------- Try lower speeds
// Try to select the best SD card configuration.
#if HAS_SDIO_CLASS
#define SD_CONFIG SdioConfig(FIFO_SDIO)
#elif ENABLE_DEDICATED_SPI
#define SD_CONFIG SdSpiConfig(SD_CS_PIN, DEDICATED_SPI, SPI_CLOCK)
#else // HAS_SDIO_CLASS
#define SD_CONFIG SdSpiConfig(SD_CS_PIN, SHARED_SPI, SPI_CLOCK) // << -------------- force shaerd SPI
#endif // HAS_SDIO_CLASS
I'm using a personnal board build with an SAMD21E17A
. Yes I'll try to edit settings, I'll let you know ;)
By default the Arduino SD.h wrapper for my 2009 version of SdFat uses a clock rate of 4 MHz for SD.begin(csPin).
In 2009 there was only the AVR 328 Arduino and I allowed 8 Mhz and 4 MHz with 4 MHz the default since the first SD modules used resistors for 5V to 3.3V level shifters and would not run at 8 MHz.
Arduino has added a more modern SD.begin(clock, csPin).
It is amazing to still see most of the 2009 SdFat library in D:\arduino\arduino-1.8.19\libraries\SD\src\utility. with the old copyright:
/* Arduino Sd2Card Library
Copyright (C) 2009 by William Greiman
This file is part of the Arduino Sd2Card Library
Hi @greiman
I've just tried to set new param but I have the same issue, I'e tried with #define SPI_CLOCK SD_SCK_MHZ(25)
and force with #define SD_CONFIG SdSpiConfig(SD_CS_PIN, SHARED_SPI, SPI_CLOCK)
but same issue when I run SdInfo after SdFormatter I got the same "error" volume not formated or
11:00:09.688 -> readInfo failed
11:00:09.688 -> SD errorCode: SD_CARD_ERROR_READ_TIMEOUT = 0x1d
11:00:09.688 -> SD errorData = 0xff
Try slower SPI, like 8 MHz. SAMD is a dog, AVR is usually faster.
Hi,
I'm working with this module https://learn.adafruit.com/adafruit-spi-flash-sd-card/overview I've just tried to format it with the SdFormatter example but after thaht my card is down, when I try a SdInfo I got
Try to do a new format with SdFormatter
And after this new format
Any ideas?