Skip to content

ESP crashes when you add attachInterrupt  #47

Open
@jeroenveer

Description

When you add a GPIO interrupt it keeps crashing.
Without the CAN library it runs fine and without attachInterrupt it also runs fine.

#include <esp32_can.h>

int SpeedCounter = 0;

void ARDUINO_ISR_ATTR ISR_SPEEDCOUNT() {
	SpeedCounter++;
}

void setup() {

	pinMode(22, INPUT_PULLUP);
	attachInterrupt(22, ISR_SPEEDCOUNT, FALLING);
}

void loop() {
  
}

rst:0xc (SW_CPU_RESET),boot:0x17 (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:1
load:0x3fff0030,len:1184
load:0x40078000,len:13220
ho 0 tail 12 room 4
load:0x40080400,len:3028
entry 0x400805e4
E (134) gpio: esp_ipc_call_blocking failed (0x103)
[ 2][E][esp32-hal-gpio.c:175] __attachInterruptFunctionalArg(): GPIO ISR Service Failed To Start
E (137) esp_cor��fVW�}���͡� No core dump partition found!
E (141) esp_core_dump_flash: No core dump partition found!
[ 17][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
E (38) gpio: gpio_install_isr_service(449): GPIO isr service already installed
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x400f165b PS : 0x00060e33 A0 : 0x800d5907 A1 : 0x3ffb21d0
A2 : 0x00000000 A3 : 0x3ffc3040 A4 : 0x3ffc3044 A5 : 0x00060e23
A6 : 0x00060e20 A7 : 0x00000001 A8 : 0x800d5550 A9 : 0x3ffb2190
A10 : 0x3ffbdbf0 A11 : 0x00400000 A12

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions