Can Bus Error - Guru Meditation Error: Core 1 panic'ed

Petros_T
Posts: 1
Joined: Thu Jan 23, 2020 10:08 pm

Can Bus Error - Guru Meditation Error: Core 1 panic'ed

Postby Petros_T » Thu Jan 23, 2020 10:31 pm

Hi!
Im working on a Can bus Display right now and having troubles, this is what im useing:

ILI9341 SPI Display with TFT_eSPI Lib.
CanBus Lib: https://github.com/sandeepmistry/arduino-CAN

BLE: Running ANCS

With the CANReceiverCallback - It is really fast and gives me good refresh rates on the display while reading the Bus.

Now to my Problem,

I am also Sending Messages periodicly to the bus for requests and simultaneously read.

After a while the ESP acts wierd and also displays artefacts on the Screen - Than it Restarts and the Bus goes OFF.

I investigated the Error:

Guru Meditation Error: Core 1 panic'ed (Coprocessor exception)
Core 1 register dump:
PC : 0x400d1adb PS : 0x00060031 A0 : 0x800d7bb8 A1 : 0x3ffbe9b0
A2 : 0x3ffc55b4 A3 : 0x00000001 A4 : 0x80093912 A5 : 0x00000000
A6 : 0x00000001 A7 : 0x3ffbaca0 A8 : 0x00000000 A9 : 0x000b4103
A10 : 0x000007e8 A11 : 0x000000fd A12 : 0x0ffdac00 A13 : 0x0000abab
A14 : 0x3ffb9a30 A15 : 0x00000000 SAR : 0x00000019 EXCCAUSE: 0x00000004
EXCVADDR: 0x00000000 LBEG : 0x400df614 LEND : 0x400df676 LCOUNT : 0x00000003
Core 1 was running in ISR context:
EPC1 : 0x400d1adb EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x40082941

Backtrace: 0x400d1adb:0x3ffbe9b0 0x400d7bb5:0x3ffbea90 0x400d7bc1:0x3ffbeab0 0x40081819:0x3ffbead0 0x4000bfed:0x00000000


And the exception decoder says this:

Decoding stack results
0x400d406f: onReceive(int) at C:\Users\PETROS~1\AppData\Local\Temp\arduino_modified_sketch_534488/ESP32_BT_6.1_OBDTIME_1.6.1_ANCS_v1.7.2.ino line 2788
0x400d7e51: ESP32SJA1000Class::handleInterrupt() at C:\Users\Petros T\Documents\Arduino\libraries\CAN\src\ESP32SJA1000.cpp line 383
0x400d7e5d: ESP32SJA1000Class::onInterrupt(void*) at C:\Users\Petros T\Documents\Arduino\libraries\CAN\src\ESP32SJA1000.cpp line 410


In the Library it has to wo with the Interrupt register - I think the problem is there.


My first try was to isolate the the reciving (without callback) into a New task(core1) and see what happens and if it hangs.

Works, but now all my Code Runs slow, from 30 FPS on the display to about 10FPS.

this is the code that has to do with the issue from the Lib:

Line 383:
void ESP32SJA1000Class::handleInterrupt()
{
uint8_t ir = readRegister(REG_IR);

if (ir & 0x01) {
// received packet, parse and call callback
parsePacket();

_onReceive(available());
}
}

Line 410:
void ESP32SJA1000Class::onInterrupt(void* arg)
{
((ESP32SJA1000Class*)arg)->handleInterrupt();
}

I hope some of you can help me, this project is almost finished and this is my last big problem to solve.

idahowalker
Posts: 166
Joined: Wed Aug 01, 2018 12:06 pm

Re: Can Bus Error - Guru Meditation Error: Core 1 panic'ed

Postby idahowalker » Sun Jan 26, 2020 1:31 pm


Who is online

Users browsing this forum: No registered users and 68 guests