Lora-net / SWL2001

LoRa Basics Modem LoRaWAN stack
BSD 3-Clause Clear License
87 stars 50 forks source link

illegal state in lorawan process stack crash - v4.5.0 #70

Open cmorganBE opened 1 week ago

cmorganBE commented 1 week ago

stack v4.5.0, esp32 port (internal at the moment)

I'm seeing this crash 306s after startup:

INFO: smtc_modem_run_engineI (306875) smtc_modem_hal: disable_modem_irq
I (306875) smtc_modem_hal: enable_modem_irq
E (306875) smtc_modem_hal: crash_string lr1mac_core_process:203 FAILSAFE EVENT OCCUR (lr1mac_state:0x1)
E (306875) smtc_modem_hal: :556 Modem panic: lr1mac_core_process:203 FAILSAFE EVENT OCCUR (lr1mac_state:0x1)
E (306875) smtc_modem_hal: crash_string lr1mac_core_process:458 Illegal state in lorawan process
E (306875) smtc_modem_hal: :556 Modem panic: lr1mac_core_process:458 Illegal state in lorawan process

 Start a new join sequence now on stack 0
I (306875) LoRaWAN: Modem event callback
W (306875) LoRaWAN: Event received: JOINFAIL
I (306875) LoRaWAN: attempting to join again
INFO: smtc_modem_join_network

I don't believe it is related to stack overflow as I have stack checking enabled in esp-idf.

Thoughts on how to debug? I'm getting more familiar with the stack every day but still early in understanding it fully.

Also, I see radio IRQ during the porting tests (which pass), but for whatever reason not during my relatively simply use case of joining. Timer irqs are occurring and look to be working as expected.