Go Down

Topic: my "Arduino UNO" connected to "SD card" is not running (Read 1 time) previous topic - next topic

Eimerkette

Hi all,

I created this new topic to maybe find a solution that my "Arduino UNO" connected to my "SD card" will run as expected/wanted.

I have now installed the new Arduino IDE (1.8.1) and using the SD example "CardInfo".
The best result so far was:
Code: [Select]

Initializing SD card...Wiring is correct and a card is present.

Card type: SD1
Could not find FAT16/FAT32 partition.
Make sure you've formatted the card

Initializing SD card...initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
############################
### card.errorCode() is: 1
############################

Initializing SD card...initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
############################
### card.errorCode() is: 1
############################

Initializing SD card...initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
############################
### card.errorCode() is: 1
############################

Initializing SD card...initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
############################
### card.errorCode() is: 8
############################

Initializing SD card...initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
############################
### card.errorCode() is: 2
############################


Any hints?

Kind regards
Albert

Delta_G

Code: [Select]
Card type: SD1
Could not find FAT16/FAT32 partition.
Make sure you've formatted the card


I'd say the program gave you a pretty big hint right there.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Eimerkette

Code: [Select]
Card type: SD1
Could not find FAT16/FAT32 partition.
Make sure you've formatted the card


I'd say the program gave you a pretty big hint right there.
But I tried many times and different formatted ones, but no success.

Eimerkette

In the meantime, I added some debug statements in file "SDVolume.cpp" to get more information:
Code: [Select]
uint8_t SdVolume::init(Sd2Card* dev, uint8_t part) {
  uint32_t volumeStartBlock = 0;
  sdCard_ = dev;
  // if part == 0 assume super floppy with FAT boot sector in block zero
  // if part > 0 assume mbr volume with partition table
  if (part) {
    if (part > 4)return error(1), false;
    if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return error(2), false;
    part_t* p = &cacheBuffer_.mbr.part[part-1];
    if ((p->boot & 0X7F) !=0  ||
      p->totalSectors < 100 ||
      p->firstSector == 0) {
      // not a valid partition
      return error(3), false;
    }
    volumeStartBlock = p->firstSector;
  }
  if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return error(4), false;


At the moment initialization of volume/partition fails in function "cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)".

Another strange observation is that a different behaviour of Arduino UNO and SD card when
a) power-on both devices (i.e. plug-in USB)
b) reset Arduino
c) power-on/off SD card while Arduino is already running
The most success rates (>99%) of "card.init()" is in case a), but what does this mean? Is it a timing mismatch (like the first 80 SPI-CLK cycles while SPI-CS has to be HIGH)?

Any more hints?

Eimerkette

After many trials and finally replacing the short, thin and cheap wires by (longer but) better ones my Arduino UNO, connected in this more reliable manner, works now as it should be.
 :)

So if someone has similar problems by using SD card, first try to use good quality connections.

(I hope tomorrow it will be functional too.)

Go Up