Page 1 of 1

Modbus Serial Master example results in runtime error

Posted: Fri Dec 22, 2023 6:21 am
by shubhs156
Hi,
Flashing the modbus serial master example on an ESP32 wroom module results in a runtime error with the following trace:


I (29) boot: ESP-IDF v5.3-dev-892-g692c1fcc52-dirty 2nd stage bootloader
I (29) boot: compile time Dec 22 2023 11:29:50
I (31) boot: Multicore bootloader
I (36) boot: chip revision: v3.1
I (39) boot.esp32: SPI Speed : 80MHz
I (44) boot.esp32: SPI Mode : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (77) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (84) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (92) boot: 3 ota_0 OTA app 00 10 00010000 00190000
I (99) boot: 4 ota_1 OTA app 00 11 001a0000 00190000
I (107) boot: End of partition table
I (111) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0ba80h ( 47744) map
I (133) esp_image: segment 1: paddr=0001baa8 vaddr=3ffbdb60 size=0335ch ( 13148) load
I (137) esp_image: segment 2: paddr=0001ee0c vaddr=40080000 size=0120ch ( 4620) load
I (140) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=164a8h ( 91304) map
I (173) esp_image: segment 4: paddr=000364d0 vaddr=4008120c size=0ab54h ( 43860) load
I (194) boot: Loaded app from partition at offset 0x10000
I (194) boot: Disabling RNG early entropy source...
I (206) cpu_start: Multicore app
I (214) cpu_start: Pro cpu start user code
I (214) cpu_start: cpu freq: 160000000 Hz
I (214) cpu_start: Application information:
I (217) cpu_start: Project name: neilsoft_energy_meter
I (223) cpu_start: App version: 1
I (228) cpu_start: Compile time: Dec 22 2023 11:38:07
I (234) cpu_start: ELF file SHA256: d9854434f...
I (239) cpu_start: ESP-IDF: v5.3-dev-892-g692c1fcc52-dirty
I (246) cpu_start: Min chip rev: v0.0
I (251) cpu_start: Max chip rev: v3.99
I (256) cpu_start: Chip rev: v3.1
I (261) heap_init: Initializing. RAM available for dynamic allocation:
I (268) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (274) heap_init: At 3FFC1930 len 0001E6D0 (121 KiB): DRAM
I (280) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (286) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (293) heap_init: At 4008BD60 len 000142A0 (80 KiB): IRAM
Guru Meditation Error: Core 0 panic'ed (LoadStoreError). Exception was unhandled.

Core 0 register dump:
PC : 0x400013df PS : 0x00060d30 A0 : 0x800e5388 A1 : 0x3ffe3b80
0x400013df: strcpy in ROM

A2 : 0x4008c188 A3 : 0x3f402a22 A4 : 0x000000ff A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x0000002f A9 : 0x3ffe3b40
A10 : 0x4008c188 A11 : 0x00000000 A12 : 0x3ffaea98 A13 : 0x00000800
A14 : 0x00000000 A15 : 0x000000c0 SAR : 0x0000001d EXCCAUSE: 0x00000003
EXCVADDR: 0x4008c188 LBEG : 0x40082a01 LEND : 0x40082a09 LCOUNT : 0x00000027
0x40082a01: esp_timer_impl_get_counter_reg at /home/shubhs/esp-idf/components/esp_timer/src/esp_timer_impl_lac.c:118

0x40082a09: esp_timer_impl_get_counter_reg at /home/shubhs/esp-idf/components/esp_timer/src/esp_timer_impl_lac.c:128



Backtrace: 0x400013dc:0x3ffe3b80 0x400e5385:0x3ffe3b90 0x400d374c:0x3ffe3bc0 0x400d128b:0x3ffe3be0 0x400d1b43:0x3ffe3c00 0x400d1b76:0x3ffe3c20 0x4008129a:0x3ffe3c50 0x4007964a:0x3ffe3c90 |<-CORRUPTED
0x400013dc: strcpy in ROM

0x400e5385: esp_vfs_register_common at /home/shubhs/esp-idf/components/vfs/vfs.c:109

0x400d374c: esp_vfs_console_register at /home/shubhs/esp-idf/components/vfs/vfs_console.c:200 (discriminator 1)

0x400d128b: __esp_system_init_fn_init_vfs_console at /home/shubhs/esp-idf/components/esp_system/startup_funcs.c:181

0x400d1b43: do_system_init_fn at /home/shubhs/esp-idf/components/esp_system/startup.c:126

0x400d1b76: do_core_init at /home/shubhs/esp-idf/components/esp_system/startup.c:164
(inlined by) start_cpu0_default at /home/shubhs/esp-idf/components/esp_system/startup.c:197

0x4008129a: call_start_cpu0 at /home/shubhs/esp-idf/components/esp_system/port/cpu_start.c:779 (discriminator 1)





ELF file SHA256: d9854434f

Rebooting...



Can someone please help.

Re: Modbus Serial Master example results in runtime error

Posted: Thu Mar 21, 2024 5:44 pm
by ESP_alisitsyn
Hi @ shubhs156,

This is not related to Modbus library but in the system library. This has been already fixed.