Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By MrZANE
#21114 It will NOT work with CS tied to ground.
Connect it to an I/O pin and make sure it is correctly defined and used in the code

martinayotte wrote:Hi Joshua,

My SDCard is formatted in FAT16.
Also, since I have a identical adapter attached on an STM32 MiniMaple, I've done some tests there too, it is actually working, I'm able to do a listDir() and fileRead().
Since there is only this SDCard adaptor on the SPI bus, I've tied the CS pin of the adaptor directly to GND.
On ESP, what look strange is the timing of the MISO, which seem to be shorter than the CLK, at least for the first transaction (see attached image).
Also, once in a while, I'm also getting the watchdog triggered, which is a bit scary.
The sketch is CardInfo/listfFiles/readwrite example merge together, but it doesn't even get thru the card.init()

EDIT : I've started adding debug traces in the library, and it failed with the timeout in the following loop :
Code: Select allwhile ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) {
User avatar
By martinayotte
#21121
It will NOT work with CS tied to ground.

Can you tell me why ?
Because it is not mandatory since I have only 1 slave.
And just to prove that, I have the same kind of SD adapter on an STM32 MapleMini with CS also tied to ground, and it is working properly.
Anyway, I will try with an additional pin later today, but I doubt about it since it is failing at ACMD41 and previous transactions are succeeding.
User avatar
By martinayotte
#21132 Hi Tytower,

I won't touch 1.6.5 even with gloves ! :lol:
(many people complains about it, not only for ESP, but other platforms too)

Anyway, for the ESP core files, I merged them with official GitHub few days ago, so it not related to that.
I'm pretty sure that when I will figured it out, it will be a stupid thing ... ;)