Comments (6)
What happens if you run the QuickStart example?
from sdfat.
quickstart example did not work:
I got standard SD library running with this parameters:
....
#define SD_MISO 2
#define SD_MOSI 15
#define SD_SCLK 14
#define SD_CS 13
SPIClass sdSPI(VSPI);
sdSPI.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS);
if(!SD.begin(SD_CS, sdSPI)){
...
So at my ESP32-CAM board the CS Pin is definitly GPIO 13
If I enter 13 in the serial monitor of quickstart example I got the following message:
13
Assuming the SD is the only SPI device.
Edit DISABLE_CHIP_SELECT to disable another device.
SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Does another SPI device need to be disabled?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0x0
Restarting
Enter the chip select pin number:
Because of I got standard SD library running I suppose that something with SPI Interface to access SDFat is going wrong
problably you can help me or give me some tips how to get the example working on ESP32-CAM
from sdfat.
Try the following.
#define SD_MISO 2
#define SD_MOSI 15
#define SD_SCLK 14
#define SD_CS 13
SPIClass sdSPI(VSPI);
#define SD_CONFIG SdSpiConfig(SD_CS, USER_SPI_BEGIN | SHARED_SPI, SD_SCK_MHZ(10), &sdSPI)
...
sdSPI.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS);
if (!SD.begin(SD_CONFIG)) { Serial.println("SD Card Mount Failed"); return; }
I don't have your ESP32 board so I can't test it.
from sdfat.
I did compile the following. But can't test it.
#include "SdFat.h"
SdFat SD;
#define SD_MISO 2
#define SD_MOSI 15
#define SD_SCLK 14
#define SD_CS 13
SPIClass sdSPI(VSPI);
#define SD_CONFIG SdSpiConfig(SD_CS, USER_SPI_BEGIN | SHARED_SPI, SD_SCK_MHZ(10), &sdSPI)
void setup() {
Serial.begin(9600);
while (!Serial) {}
sdSPI.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS);
if (!SD.begin(SD_CONFIG)) { Serial.println("SD Card Mount Failed"); return; }
}
void loop() {
}
from sdfat.
this works,
thank you for support :-)
you should at minimum add an addidional example in your repo please
found many posts on google about people with same problem
from sdfat.
you should at minimum add an addidional example in your repo please
There is a example of more general way to use non standard SPI.
The arguments for SdSpiConfig are defined in the html documentation.
The problem is that there are now hundreds arduino compatible boards. I can't really even test on very many.
See this.
from sdfat.
Related Issues (20)
- MMC_ERASE HOT 2
- Wrapper to fs::FS to use SDfat in ESPAsyncWebserver HOT 6
- pico-sdk only rp2040 implementation HOT 11
- ESP32 S3 always fails to mount card HOT 10
- Unable to format flat Spiflash module with ESP8266 HOT 4
- Mount issues for a Windows-formatted card HOT 35
- SD NAND XTSD01G (surface mounted chip) not formating HOT 1
- Unable to share the same SPI bus with TFT_eSPI on ESP32 HOT 3
- Problems with multiple SD card HOT 3
- Long timeout calling begin() on Teensy 4.1 when no card present HOT 5
- SdFat 2.22 with USER_SPI1 pin + another USER_SPI2 in SPI_Mode3 HOT 2
- Arduino-Pico: huge slowdown with v2.2.2 (vs.2.1.1) HOT 5
- Problem with SdFat and TwoWire instance. HOT 3
- sd.begin(SPI_CONFIG) breaks my DMA ADC datalogger on the SAMD51 HOT 5
- Issue after latest update. HOT 17
- exFat sd cards not working with Sdinfo.ino example, only FAT32 card HOT 7
- Allocating bin file with 0s HOT 2
- CS_Pin has to be driven high on ESP32 (to be low at the SDCARD) because of some logic inbetween HOT 3
- Initialization fails with ESP32 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdfat.