some error about esp32 for sd driver

tianyingkeji
Posts: 4
Joined: Fri Nov 17, 2017 2:08 pm

some error about esp32 for sd driver

Postby tianyingkeji » Fri Nov 17, 2017 2:17 pm

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 5063 times
[/img]

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: some error about esp32 for sd driver

Postby ESP_igrr » Sat Nov 18, 2017 2:04 pm

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.

tianyingkeji
Posts: 4
Joined: Fri Nov 17, 2017 2:08 pm

Re: some error about esp32 for sd driver

Postby tianyingkeji » Mon Nov 20, 2017 3:14 pm

Thank to you for your answer.when I check all my use functions,but nothing that destroy IO4.The accessory is my code。
Attachments
main.zip
(12.17 KiB) Downloaded 339 times

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: some error about esp32 for sd driver

Postby ESP_Sprite » Mon Nov 20, 2017 4:50 pm

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).

tianyingkeji
Posts: 4
Joined: Fri Nov 17, 2017 2:08 pm

Re: some error about esp32 for sd driver

Postby tianyingkeji » Sat Nov 25, 2017 11:22 am

Thank you very much! you are right. my Problems have been resolved.

Who is online

Users browsing this forum: No registered users and 84 guests