- This topic has 1 reply, 2 voices, and was last updated 2 years ago by .
- You must be logged in to reply to this topic.
Home › Forums › Raspberry Pi › Schede Raspberry Pi Pico › Question about LittleFS on rp2040 system
Hello,
one Question about the “integrated LittleFS filesystem – 2” tutorial:
I have tested the examples as shown in the tutorial. It seems to work fine. I can read / write files from / to the build in Flash Memory, but when i want to get the info’s about the File system, configured in the Settings of Arduino Up-loader i get the wrong data. The same Data as shown in the tutorial.
FSInfo *info;
LittleFS.info(*info);
uint32_t totalBytes = info->totalBytes;
uint32_t usedBytes = info->usedBytes;
uint32_t freeBytes = totalBytes-usedBytes;
uint32_t maxPath = info->maxPathLength;
uint32_t blockSize = info->blockSize;
uint32_t pagesize = info->pageSize;
uint32_t maxOpen = info->maxOpenFiles;
Serial1.println("File System info:");
Serial1.print("Total space: ");Serial1.print(totalBytes);Serial1.println("byte");
Serial1.print("Total space used: ");Serial1.print(usedBytes); Serial1.println("byte");
Serial1.print("Total space free: ");Serial1.print(freeBytes); Serial1.println("byte");
Serial1.print("Max path lenght: ");Serial1.println(maxPath);
Serial1.print("Block size: ");Serial1.print(blockSize); Serial1.println("byte");
Serial1.print("Page size: ");Serial1.print(pagesize); Serial1.println("byte");
Serial1.print("Max open files: ");Serial1.println(maxOpen);
output is:
File System info:
Total space: 537140992byte
Total space used: 239byte
Total space free: 537140753byte
Max path lenght: 13107322
Block size: 53byte
Page size: 49byte
Max open files: 33649997
Test.txt 39 byte
What is going wrong here? Its the same values as shown in the tutorial…
Thank you for support.
Best regards,
Horst
Mmmm.. It’s very strange, It returns the specs of File-system, not the actual information like esp32 or esp8266.
But there isn’t another method to retrieve the free space, I think I must write to rp2040 maintainer.
Bye Renzo
More
3D Printer 3D printer upgrade ABB Arduino Arduino IDE Arduino SAMD boards Aurora AWS CNC Cyclone PCB Factory Cyclone PCB Factory how to build It Display DynamoDB E32 E70 EByte esp01 esp32 esp8266 File System Firmware i2c Library LoRa MicroPython Milling PCB My PCB Networking PCB pinout Power saving Raspberry Pi REST API RF rp2040 SD Card Sensors Sleep and Wake UP SPI STM32 Temperature Tutorial Web Server Wemos D1 mini WiFi