Closed
Description
Hi,
I'm playing with simplefoc lib and lowside current sense a little bit.
I add a current sense oject to my code like
LowsideCurrentSense cs = LowsideCurrentSense(0.015f, 20.0f, CS_A, CS_B);
and in setup() call init method
cs.init();
the esp32 get core panic exception, exactly in this line, when I comment it no problem exists.
Serial monitor output:
rst:0xc (SW_CPU_RESET),boot:0x13 (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:1344
load:0x40078000,len:13516
load:0x40080400,len:3604
entry 0x400805f0
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d3d90 PS : 0x00060830 A0 : 0x800d1500 A1 : 0x3ffb27d0
A2 : 0x3ffc1440 A3 : 0x3ffc1480 A4 : 0x0800001c A5 : 0x00000003
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x3ffb27a0
A10 : 0x3ffb9115 A11 : 0x3ff5e000 A12 : 0x00000000 A13 : 0xffffcfc7
A14 : 0x000061a8 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000020 LBEG : 0x40085f58 LEND : 0x40085f63 LCOUNT : 0x00000000
Backtrace:0x400d3d8d:0x3ffb27d00x400d14fd:0x3ffb27f0 0x400d5622:0x3ffb2820
ELF file SHA256: 0000000000000000
Rebooting...
The problem ocurres in version 2.2.2 of simplefoc. In 2.2.1 it seems to be good, there is no core panic error.
Hardware setup:
- ESP-32 ESP-WROOM-32 board
- own motor controller board, but exception ocurres when I use only ESP32 board too - anything disconected.
IDE
- Arduino IDE and PlatformIO - both the same exception
- esp32 package in 2.0.3 version by espressif