emelianov / modbus-esp8266

Most complete Modbus library for Arduino. A library that allows your Arduino board to communicate via Modbus protocol, acting as a master, slave or both. Supports network transport (Modbus TCP) and Serial line/RS-485 (Modbus RTU). Supports Modbus TCP Security for ESP8266/ESP32.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with begin

carminelau opened this issue · comments

hello, the library works perfectly with an ESP32 Wrrom32 but as soon as I try to run it on an ESP32 S3 Wroom when calling mb.begin the whole system crashes.

Serial.println("INIT SERIAL1"); Serial1.begin(9600, SERIAL_8E1, RXD_PIN, TXD_PIN); // Initialize Serial1 port on ESP32 pins according to schematics and Speed and format according to the device manual Serial.println("INIT MODBUS"); mb.begin(&Serial1, RE_PIN, DE_PIN, true); // Assign RE and DE pins for data flow control Serial.println("MODBUS MASTER"); mb.master();

This is the result:
`INIT SERIAL1
INIT MODBUS
Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x00000000 PS : 0x00060c30 A0 : 0x8200f01c A1 : 0x3fcebe40
A2 : 0x3fc9b26c A3 : 0x3c091552 A4 : 0x00000031 A5 : 0x00000020
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x8200efca A9 : 0x3fcebe30
A10 : 0x3fc9b26c A11 : 0x3c091552 A12 : 0x0000000d A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x0000001b EXCCAUSE: 0x00000014
EXCVADDR: 0x00000000 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xfffffffc

Backtrace: 0xfffffffd:0x3fcebe40 0x4200f019:0x3fcebe60 0x42004811:0x3fcebe80 0x42011a0a:0x3fcebee0

ELF file SHA256: 8d6bba0194c4b1f1`

Someone can help me ?