Page 1 of 1

some error about esp32 for sd driver

Posted: Fri Nov 17, 2017 2:17 pm
by tianyingkeji
I want to use esp32 drive sd for fatfs,but when i use fopen and fgets function at different source file.these are some error……
[img]
error.JPG
error.JPG (57.23 KiB) Viewed 5064 times
[/img]

Re: some error about esp32 for sd driver

Posted: Sat Nov 18, 2017 2:04 pm
by ESP_igrr
According to the log, you do something about GPIO4 pin (reconfigure it as input) after SD card is initialized.
This is an SD card pin, and changing its configuration causes SD card to fail.

Re: some error about esp32 for sd driver

Posted: Mon Nov 20, 2017 3:14 pm
by tianyingkeji
Thank to you for your answer.when I check all my use functions,but nothing that destroy IO4.The accessory is my code。

Re: some error about esp32 for sd driver

Posted: Mon Nov 20, 2017 4:50 pm
by ESP_Sprite
Check your setting of io_conf.pin_bit_mask in spi_master2.c. You put a GPIO number in there (18), but you should put a bitmask in there (1<<18).

Re: some error about esp32 for sd driver

Posted: Sat Nov 25, 2017 11:22 am
by tianyingkeji
Thank you very much! you are right. my Problems have been resolved.