my esp32 board keep crashing with DWM1000 in anchor mode

kyubot
Posts: 1
Joined: Sat Nov 06, 2021 3:05 pm

my esp32 board keep crashing with DWM1000 in anchor mode

Postby kyubot » Sat Nov 06, 2021 3:16 pm

Hello all,
I made a board that communicate between ESP32 board and DWM1000 module.
I used a library from this https://github.com/thotro/arduino-dw1000
My pin connection as bel ow
const uint8_t PIN_RST = 15; // reset pin
const uint8_t PIN_IRQ = 17; // irq pin
const uint8_t PIN_SS = 2; // spi select pin

I setup both TAG and ANCHOR side by side and was able to talk to each other and get distances however ESP32 set as Anchor keeps crashing after about 100 seconds of working.

I gathered the output when it crashes as below.

I even tried to lower the clock speed but no luck.

/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1446 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x40086857 on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x4008586c:0x3ffbeb60 0x40085ae1:0x3ffbeb80 0x40086857:0x3ffbeba0 0x400da129:0x3ffbebe0 0x400d7ac9:0x3ffbec00 0x400d19ff:0x3ffbec30 0x400d1a79:0x3ffbec60 0x400d236f:0x3ffbec80 0x40080f59:0x3ffbeca0 0x40084129:0x3ffbecc0 0x4000bfed:0x3ffb1c10 0x40087c29:0x3ffb1c20 0x400870ec:0x3ffb1c40 0x400d981e:0x3ffb1c70 0x400d9bc3:0x3ffb1ca0 0x400d7c75:0x3ffb1cc0 0x400d7ca9:0x3ffb1ce0 0x400d7d05:0x3ffb1d00 0x400d4beb:0x3ffb1d20 0x400d4d1a:0x3ffb1d40 0x400d4f22:0x3ffb1d70 0x400d6b61:0x3ffb1d90 0x400d745d:0x3ffb1f80 0x400dadb9:0x3ffb1fb0 0x40086af1:0x3ffb1fd0
#0 0x4008586c:0x3ffbeb60 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
#1 0x40085ae1:0x3ffbeb80 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
#2 0x40086857:0x3ffbeba0 in xQueueGenericReceive at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:2038
#3 0x400da129:0x3ffbebe0 in spiTransaction at /home/cto/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:283
#4 0x400d7ac9:0x3ffbec00 in SPIClass::beginTransaction(SPISettings) at /home/cto/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:269
#5 0x400d19ff:0x3ffbec30 in DW1000Class::readBytes(unsigned char, unsigned short, unsigned char*, unsigned short) at src/DW1000.cpp:1656
#6 0x400d1a79:0x3ffbec60 in DW1000Class::readSystemEventStatusRegister() at src/DW1000.cpp:1656
#7 0x400d236f:0x3ffbec80 in DW1000Class::handleInterrupt() at src/DW1000.cpp:1656
#8 0x40080f59:0x3ffbeca0 in __onPinInterrupt at /home/cto/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.c:274
#9 0x40084129:0x3ffbecc0 in _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154
#10 0x4000bfed:0x3ffb1c10 in ?? ??:0
#11 0x40087c29:0x3ffb1c20 in vTaskExitCritical at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3507
#12 0x400870ec:0x3ffb1c40 in xEventGroupWaitBits at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/event_groups.c:338
#13 0x400d981e:0x3ffb1c70 in i2cProcQueue at /home/cto/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:1287
#14 0x400d9bc3:0x3ffb1ca0 in i2cWrite at /home/cto/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:1629
#15 0x400d7c75:0x3ffb1cc0 in TwoWire::writeTransmission(unsigned short, unsigned char*, unsigned short, bool) at /home/cto/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:160
#16 0x400d7ca9:0x3ffb1ce0 in TwoWire::endTransmission(bool) at /home/cto/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:160
#17 0x400d7d05:0x3ffb1d00 in TwoWire::endTransmission() at /home/cto/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:160
#18 0x400d4beb:0x3ffb1d20 in SSD1306Wire::sendCommand(unsigned char) at src/DWDisplay.cpp:31
#19 0x400d4d1a:0x3ffb1d40 in SSD1306Wire::display() at src/DWDisplay.cpp:31
#20 0x400d4f22:0x3ffb1d70 in DW_DISPLAY::refresh() at src/DWDisplay.cpp:39
#21 0x400d6b61:0x3ffb1d90 in refreshDisplay() at src/main.cpp:253
#22 0x400d745d:0x3ffb1f80 in loop() at src/main.cpp:446
#23 0x400dadb9:0x3ffb1fb0 in loopTask(void*) at /home/cto/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:23
#24 0x40086af1:0x3ffb1fd0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

This is how I initialized the board as Anchor in setup()
[Codebox]
//init the configuration
DW1000Ranging.initCommunication(PIN_RST, PIN_SS, PIN_IRQ); //Reset, CS, IRQ pin
//define the sketch as anchor. It will be great to dynamically change the type of module
DW1000Ranging.attachNewRange(newRange);
DW1000Ranging.attachInactiveDevice(inactiveDevice);
DW1000Ranging.attachBlinkDevice(newBlink);
DW1000Ranging.startAsAnchor("82:17:5B:D5:A9:9A:E2:9C", DW1000.MODE_LONGDATA_RANGE_ACCURACY, device_address);

[/Codebox]

Any help would be greatly appreciated.

Kyu

Who is online

Users browsing this forum: Google [Bot] and 73 guests