xreef / LoRa_E32_Series_Library

Arduino LoRa EBYTE E32 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards). sx1278/sx1276
https://www.mischianti.org
Other
352 stars 72 forks source link

ESP32 crashing on example code #13

Closed theoroborus closed 4 years ago

theoroborus commented 4 years ago

I was getting an inconsistent error on esp 32.

Here's my 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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x4000c2af  PS      : 0x00060130  A0      : 0x800d1203  A1      : 0x3ffb1f60
A2      : 0x3ffb1f82  A3      : 0x00000000  A4      : 0x00000006  A5      : 0x3ffb1f82  
A6      : 0x00000001  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x00000000
A10     : 0x00000009  A11     : 0x00000003  A12     : 0x3ffbebf0  A13     : 0x00000003  
A14     : 0x00000001  A15     : 0x00000000  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  

Backtrace: 0x4000c2af:0x3ffb1f60 0x400d1200:0x3ffb1f70 0x400d27c3:0x3ffb1fb0 0x40088215:0x3ffb1fd0

Rebooting...

I couldn't understand how to use the library properly. Fix :


#include "Arduino.h"
#include "LoRa_E32.h"

extern "C" {
}

byte LoRa_AUX = 18;
byte LoRa_M0 = 21;
byte LoRa_M1 = 19;

#define RXD2 16
#define TXD2 17

LoRa_E32 e32ttl(&Serial1, RXD2, TXD2, LoRa_AUX, LoRa_M0, LoRa_M1); // serial port, aux, m0, m1, baudrate

The library is straight forward but it's mandatory to read the E32's manual. I couldn't get my module to work until I understood they were misconfigured :). I edited all E32's parameters and then it started running. :)

ezcGman commented 2 years ago

Hey @BorisDess! Sorry for warming up this old issue, but I seem to have a similar issue then you and asking myself how you exactly fixed it. Mainly the crash I posted there: https://github.com/xreef/LoRa_E32_Series_Library/issues/38

If you may be able to spare a minute, would be really appreciated! If not: No worries :)