8000 Incorrect SD card size and usedBytes > totalBytes reported by SDFS · Issue #1552 · earlephilhower/arduino-pico · GitHub
[go: up one dir, main page]

Skip to content
Incorrect SD card size and usedBytes > totalBytes reported by SDFS #1552
@mef51

Description

@mef51

Hello, I'm using a 16 GB micro SD card with the Pico W and the size is being incorrectly reported with SDFS.info64 and FSInfo64

Example sketch:

#include <SDFS.h>
#define CS_PIN 17 // Chip Select (SPI)
#define CD_PIN 22 // Card Detect
FSInfo64 SDinfo;
SDFSConfig sdconf;

void setup() {
  sdconf.setCSPin(CS_PIN);
  SDFS.setConfig(sdconf);
  SDFS.begin();
  SDFS.info64(SDinfo);
  Serial.print("total bytes: "); Serial.println(SDinfo.totalBytes);
  Serial.print("used bytes: "); Serial.println(SDinfo.usedBytes);
}

void loop() {}

Output:

total bytes: 3038248960
used bytes: 4295098368

That's 3.03 GB total and 4.3 GB used bytes.

I can write to the card without issue using SDFS and plugging the card into my desktop reports the correct size and files. Same behaviour with SDFS before and after formatting

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0