-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esp32 exFAT SD not initialising #46
Comments
FreeStack not defined is OK. It is not supported for ESP. On other systems it returns unused stack space. I can't help with your problem. I don't use ESP32 any more. There are now too many Arduino like boards form me to support. |
I am quite happy to do some investigation myself. I am quite well equipped electronically (if need be) and I am good enough at software to have altered the Utouch library to work with esp32. Could you perhaps briefly explain the preAllocate failed error or point me at some documentation? |
Your error code is for a a multi block read which makes little sense. I can't help. Edit: looks like it was a block read, likely the bitmap looking for free clusters. You could try editing SdFatConfig.h and select standard library driver like this:
It will be slower than the custom driver. I will probably drop the custom driver since it is a pain to maintain. I do have an ESP-VROOM-32 board and tried it with a 64 GB Samsung PRO+ SD. I selected 25 MHz SPI speed since the ESP32 driver has a bug and tries speeds higher than it can support.
Here is the bench result:
I tried shared SPI. Here is the result.
|
Hi I wanna try exfat with esp32 to access some times like last modified last access etc. But last on some forums I checked esp32 doesn't support exfat so will it work |
There are conflicts with the esp32 system. It's best to use the esp32 SD library. I don't want to fight changes in esp32. You can try SdFat but expect conflicts. |
I have an esp32 using hardware SPI with a tft display and the sd card sharing the SPI.
It is working fine with a FAT32 sd card - the SPI frequency is set to 16Mhz for the sd card and the display. It still works fine using the new library.
The problem arises when I use a new SanDisk Extreme Pro SD card (64Gb).
I have got as far as begin() working but when it tries to open a file it fails.
I have run bench.ino and it fails at the same point (opening the file) though it ran quite happily in the same hardware setup with a fat32 card. The card is freshly formatted using the proper formatter.
I have
SD_FAT_TYPE 3
My chip select is fine on pin 5 for other cards. SD_CS_PIN 5
I have SPI_CLOCK SD_SCK_MHZ(16)
I have forced the use of #define SD_CONFIG SdSpiConfig(SD_CS_PIN, SHARED_SPI, SPI_CLOCK)
The output of bench is:-
Type is exFAT
Card size: 63.86 GB (GB = 1E9 bytes)
Manufacturer ID: 0X3
OEM ID: SD
Product: SR64G
Version: 8.0
Serial number: 0X78524428
Manufacturing date: 1/2014
FILE_SIZE_MB = 5
BUF_SIZE = 512 bytes
Starting write test, please wait.
write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
error: preAllocate failed
SdError: 0XC,0X7F
Thanks for your efforts.
I am a bit new to mucking around with SD cards so forgive me if I am being foolish.
Glyn
p..s. perhaps I should mention that I get a compiler warning -
#warning FreeStack is not defined for this system.
but I got that with the old library and it did not seem to make any difference. I commented out the include to get rid of the warning back then. I don't know what it does and since things were working I have ignored it.
The text was updated successfully, but these errors were encountered: