B4R Question rSD32 lib and rSD lib with ESP32

peacemaker

Expert
Licensed User
Longtime User
Hi, All and @candide

My test MicroSD card is rather old, 2 GB one.

1) Strange, but rSD32 lib cannot be used - ESP32 MCU is rebooted at SD.totalBytes, but previous SD.cardSize works OK:
I was trying to init with low frequency also, but in vain.
Any idea why ?


2) Regular rSD works (not fully OK writing, debugging yet), reads and writes, but found that each 100 text lines (20 bytes each) - are written during ... 6+ seconds !
It is very slow.
What are your writing speed results ?

3)
21:22:01.745 -> Reading file: /hello.txt

21:22:01.745 -> Read from file: Hello World!

21:22:01.745 -> Deleting file: /foo.txt

21:22:01.745 -> File deleted

21:22:01.745 -> Renaming file /hello.txt to /foo.txt

21:22:01.782 -> File renamed

21:22:01.782 -> Reading file: /foo.txt

21:22:01.782 -> Read from file: Hello World!

21:22:04.268 -> 1048576 bytes read for 2475 ms

21:22:08.076 -> 1048576 bytes written for 3773 ms

21:22:08.647 -> Total space: 1881MB

21:22:08.647 -> Used space: 21MB
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
If to save the same 100 text lines (20 bytes each) by Inline C++ code - it works 3 times faster !
but its too early to be glad...
 
Upvote 0

candide

Active Member
Licensed User
for SD32 library,
difficult to understand where is the problem, sd32 is similar to SD except for initialize

please to share code used (initialize used) and hard configuration (esp32 version, pins, SPI version)
also, add several Log("stack: ",StackBufferUsage) in your code and you will see if you have stack issue
did you try to lock SD.totalBytes and to check if your code can continue to run ?

i will try to do some tests in next days
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I have tried just your example project of rSD32 on classic ESP32 (old NodeMCU CH340 Type-C module), with default pinout (VSPI = 3, uses SPI3 => MOSI (23), SCK (18), MISO (19), SS (5)), but at the latest B4R v4.0 and ESP32 SDK v3.0.4.
I guess, the latest SDK may give some difference, please, check at your side.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…