Reputation: 27
I am working on a project using an ESP32-S3-CAM WROOM FREENOVE board and MicroPython v1.24.1. I need to read and write raw data directly to an SD card without using a filesystem, as the card has a capacity of 256GB and I want to utilize its full space. However, when I use readblocks()
, it always returns a bytearray
filled with 0x00
.
Here is the code I'm using:
from machine import SDCard
sd = SDCard(sck=39, mosi=38, miso=40)
data = bytearray(512)
sd.readblocks(1, data)
print(data)
readblocks()
call aligns with the block size and block address conventions of the SD card.writeblocks()
to see if I could modify the raw data on the SD card, but there was no observable effect.readblocks()
always returns a bytearray
filled with 0x00
, regardless of what was written to the card.readblocks()
returning only zeros?machine.SDCard
implementation?Any insights or suggestions would be appreciated. Let me know if more information is needed!
Upvotes: 1
Views: 33