PlatformIO problem working with SD card #2737
Replies: 4 comments 5 replies
-
Maybe try to change the SD.begin(12, SPI, 1000000); to SD.begin(12, tft.getSPIinstance(), 1000000); ? |
Beta Was this translation helpful? Give feedback.
-
try in the setup:
then:
etc... |
Beta Was this translation helpful? Give feedback.
-
ooops sorry,i was dealing with sdfat,but with SD.h the name is SD
|
Beta Was this translation helpful? Give feedback.
-
That's weird!! Here : https://www.arduino.cc/reference/en/libraries/sd/begin/ Someone wrote here: https://arduino.stackexchange.com/questions/33455/why-is-sd-card-failing-to-begin I can tell you i also had problems with "sdcard CS failed" all of because it was a 32Gb card and the one wich worked If you use a esp32 devkit1 (regular one),take a look at this post: The example i posted there works with a sdcard and a separate tft, but use HSPI & VSPI,don't need to activate |
Beta Was this translation helpful? Give feedback.
-
PlatformIO, esp32
I am using a touch screen(ILI9341), the screen and touch worked well
But
SD.begin()
gives meAnd
SD.open()
gives meMy code is like:
I didn't do
SPI.begin()
, so im kinda sure SD and TFT are using a same SPI object (thattft.init()
created)But when I add
SPI.begin(18, 19, 23);
betweentft.init()
andSD.init()
(There should be 4 args, the last arg is
ss
, but i dont know whatss
is , is it same ascs
? if it is, should i use SD's cs or TFT's cs or TOUCH's cs?)SPI.begin()
gives meSD.begin()
gives meAnd
SD.open()
give the same errorThen, I put
SPI.begin()
line in front oftft.begin()
, The error is as same as that when i didn't addSPI.begin()
(So i guess
tft.begin()
overwrites SPI object?)My wire connection is like
My SD card is 32gb, but i have just make a partition with 1.5gb size and FAT16, the left space has no partition
Accordint to 1509, I have no idea im using which of FSPI, VSPI or HSPI, i have no code setting them
(sorry my english is a little poor)
(and im basiclly new to hardware stuff)
By the way, ive post this question to 1509, but there was no reply
Should i not post question to a closed issue?
Beta Was this translation helpful? Give feedback.
All reactions