Modbus Master component causes panic when writing to flash
Posted: Sat Jan 23, 2021 11:57 am
Hello everyone,
I'm looking for some insight on a problem that occurred to me yesterday.
I am working on a custom ESP32 board that needs to have its firmware updated via OTA. I also have a secondary task continuously communicating with another device via Serial Modbus (RS232, master RTU).
I noticed that the OTA procedure was failing due to the ESP32 panicking with the following message : "Guru Meditation Error: Cache disabled but cached memory region accessed". This is normally due to some interrupt executing non-IRAM code during a flash write operation.
I realized that by cancelling the Modbus task during the update procedure everything went smoothly - which is a definitive solution, because I don't need to keep up the updates during firmware upload. However I would like to understand why the Modbus Communication was causing this panic (if that is the culprit), as I was not directly enabling any interrupt for the UART peripheral.
I'm looking for some insight on a problem that occurred to me yesterday.
I am working on a custom ESP32 board that needs to have its firmware updated via OTA. I also have a secondary task continuously communicating with another device via Serial Modbus (RS232, master RTU).
I noticed that the OTA procedure was failing due to the ESP32 panicking with the following message : "Guru Meditation Error: Cache disabled but cached memory region accessed". This is normally due to some interrupt executing non-IRAM code during a flash write operation.
I realized that by cancelling the Modbus task during the update procedure everything went smoothly - which is a definitive solution, because I don't need to keep up the updates during firmware upload. However I would like to understand why the Modbus Communication was causing this panic (if that is the culprit), as I was not directly enabling any interrupt for the UART peripheral.