Skip to content

Invoking SD_MMC.end method creates a crash #5739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pberna67 opened this issue Oct 6, 2021 · 6 comments
Closed

Invoking SD_MMC.end method creates a crash #5739

pberna67 opened this issue Oct 6, 2021 · 6 comments
Assignees

Comments

@pberna67
Copy link

pberna67 commented Oct 6, 2021

Dear Developer

If the method SD_MMC.end is invoked, using ESP 2.0.0 than the system crash. There is no crash with previous ESP versions. This bug can be easily verified just using the SDMMC_Test and adding the SD_MMC.end method at the end of the example. Compile and run, then the system crashed

Describe your system( Hardware, computer, O/S, core version, environment).
Board: u.blox NINA B102 board with ESP32
Core Installation/update date: ESP 32 lib available in this site today
IDE name: Arduino IDE
Flash Frequency: https://www.u-blox.com/en/product/evk-nina-w10
PSRAM enabled: unnknown
Upload Speed: 115200
Computer OS: Windows 10

Additional not standard Libraries installed:
SD v1.2.4
Wifi v.2.4
Dellas T%emperature v2.9.0
DS18B29 v1.0.0
ESP32TimerInterrupt v1.4.0
ESOMQTTClient v1.11.1
OneWire v2.3.5
PubSubLinbet v2.8.9
RTCLib v1.14.1
uRTCLib v6.4.0

Modified (just with the SD_MMC.end() method added) sketch
SDMMC_Test_github.zip

Serial windows view

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1100
ho 0 tail 12 room 4
load:0x40078000,len:12280
ho 0 tail 12 room 4
load:0x40080400,len:3076
entry 0x400805ec
SD_MMC Card Type: SDSC
SD_MMC Card Size: 1886MB
Listing directory: /
DIR : System Volume Information
FILE: test.txt SIZE: 1048576
FILE: foo.txt SIZE: 13
FILE: log_ori.txt SIZE: 3294504
FILE: log_ori_2.txt SIZE: 16319302
FILE: log_at-16-06-21.txt SIZE: 23181588
Creating Dir: /mydir
Dir created
Listing directory: /
DIR : System Volume Information
FILE: test.txt SIZE: 1048576
FILE: foo.txt SIZE: 13
DIR : mydir
FILE: log_ori.txt SIZE: 3294504
FILE: log_ori_2.txt SIZE: 16319302
FILE: log_at-16-06-21.txt SIZE: 23181588
Removing Dir: /mydir
Dir removed
Listing directory: /
DIR : System Volume Information
Listing directory: /System Volume Information
FILE: WPSettings.dat SIZE: 12
FILE: IndexerVolumeGuid SIZE: 76
FILE: test.txt SIZE: 1048576
FILE: foo.txt SIZE: 13
FILE: log_ori.txt SIZE: 3294504
FILE: log_ori_2.txt SIZE: 16319302
FILE: log_at-16-06-21.txt SIZE: 23181588
Writing file: /hello.txt
File written
Appending to file: /hello.txt
Message appended
Reading file: /hello.txt
Read from file: Hello World!
Deleting file: /foo.txt
File deleted
Renaming file /hello.txt to /foo.txt
File renamed
Reading file: /foo.txt
Read from file: Hello World!
1048576 bytes read for 1360 ms
1048576 bytes written for 3912 ms
Total space: 1877MB
Used space: 41MB

// Here the SD_MMC.end() method is invoked

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x400d601c PS : 0x00060530 A0 : 0x800d462c A1 : 0x3ffb26f0
A2 : 0xc6a11032 A3 : 0x00000000 A4 : 0x00000009 A5 : 0x3ffb278f
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80083b20 A9 : 0x3ffb2700
A10 : 0x3ffb8000 A11 : 0x3ffb93cc A12 : 0x00000004 A13 : 0xb33fffff
A14 : 0x00000001 A15 : 0x00000001 SAR : 0x00000018 EXCCAUSE: 0x0000001c
EXCVADDR: 0xc6a11036 LBEG : 0x400df848 LEND : 0x400df852 LCOUNT : 0x00000000

Backtrace:0x400d6019:0x3ffb26f00x400d4629:0x3ffb2720 0x400d4792:0x3ffb2760 0x400e718f:0x3ffb2780 0x400e7301:0x3ffb27b0 0x400d31b1:0x3ffb27d0 0x400d2443:0x3ffb27f0 0x400d3e1b:0x3ffb2820

ELF file SHA256: 0000000000000000

Rebooting...
ets Jul 29 2019 12:21:46

@pberna67 pberna67 changed the title SD_MMC.end method creates a crash Invoking SD_MMC.end method creates a crash Oct 6, 2021
@me-no-dev
Copy link
Member

@P-R-O-C-H-Y have a look please.

@P-R-O-C-H-Y
Copy link
Member

@me-no-dev
Already fixed need to be merged. PR -> Fix: SD_MMC deinit #5732

@me-no-dev
Copy link
Member

done :)

@pberna67
Copy link
Author

can I download the update from this link ?
https://github.com/espressif/arduino-esp32/archive/refs/heads/master.zip

@P-R-O-C-H-Y
Copy link
Member

Yes, Its merged into the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants