2025-04-07 11:10 PM
Initially flashed the device with a custom code from and it worked fine, the flashed device ran for several days in line power even after multiple power cuts. But one day it stopped trying to join at all. I have used an external RTC to generate alarms to send sensor data to gateway at a particular interval. The sensors, RTC are all initialized successfully and the messages are being printed and then the version of LoRa application versions are also being printed after that then after the device has to try joining i.e MAC Tx done. But I don't see anything printed after that, the code just stops there for no reason.
[11:09:32.669] APPLICATION_VERSION: V1.3.0
[11:09:32.672] MW_LORAWAN_VERSION: V2.5.0
[11:09:32.672] MW_RADIO_VERSION: V1.3.0
[11:09:32.672] L2_SPEC_VERSION: V1.0.3
[11:09:32.672] RP_SPEC_VERSION: V1-1.0.3
[11:09:32.685] NVM DATA RESTORED
[11:09:32.692] ###### AppKey: 7B:3C:18:12:9A:D3:6F:EF:35:22:3A:CB:F9:7A:37:E6
[11:09:32.733] ###### NwkKey: 7B:3C:18:12:9A:D3:6F:EF:35:22:3A:CB:F9:7A:37:E6
[11:09:32.733] ###### AppSKey: 94:62:7E:D1:E4:62:8A:49:02:C5:44:84:92:FF:3D:53
[11:09:32.733] ###### NwkSKey: 9F:A7:01:19:3B:82:71:0B:2E:8F:9E:68:1C:D2:A5:62
[11:09:32.733] ###### DevEUI: 46:D4:1A:90:EC:00:1D:29
[11:09:32.733] ###### AppEUI: A0:AD:B7:7E:D6:AC:36:E7
[11:09:32.733] ###### DevAddr: 60:20:11:31
2025-04-08 1:36 AM
Code doesn't just stop for no reason.
Have you used the debugger to see what's actually happening in this state?
Add some more prints for better insight into what's going on ...
2025-04-08 1:39 PM - edited 2025-04-08 10:18 PM
Can I use debugger to debug as in STM32CubeIDE? The device ran for several days until one day when this issue occurred. However many times I reset the board or just stops there, suprisingly when I reflashed the exact same code that was flashed previously everything started working normally with no problems, it joined the network succesfully and started sending data as expected.
2025-04-09 1:03 AM - edited 2025-04-09 1:14 AM
@user_01 wrote:Can I use debugger to debug as in STM32CubeIDE? .
Of course!
EDIT: And, as mentioned, you can add extra printf to see what's going on in real-time without the debugger connected.
@user_01 wrote:suprisingly when I reflashed the exact same code that was flashed previously everything started working normally with no problems, it joined the network succesfully and started sending data as expected.
It seems that you save some information:
@user_01 wrote:[11:09:32.685] NVM DATA RESTORED
Maybe something in that is getting you stuck ... ?
Also might be dependent on whatever network you're using ...