LRWAN3 - Hard Fault on AT+DR command
Hi everyone,
I have a pnucleo lrwan3 kit and I'm trying to setup the end node using the LRWAN NS1 AT Master example from I-NUCLEO-LRWAN package.
Everything is working fine until the program gets to the AT+DR command. There a Hard Fault occurs and it gets stuck in a forever loop (default handler).
I tried to isolate the problem using the debugger. When the program reaches the switch(DEVICE_STATE) statement, the hard fault occurs. The problem is that I can't get the debugger to enter this switch statement, but it does enter, as various AT commands are being printed after the switch, and before the hard fault.
I tried to get infos on this hard fault, but the analyzer does not provide me any clue. I can only get the SP register value and I have not enough knowledge to get any useful info out of it.
I suspect a problem with the AT+DR command. In fact, the program load and works like a charm using Keil uVision. The hard fault only occurs with STM32CubeIDE. You may think that I played with the configuration of the board, but it is not the case... And that's why I'm desperate.
STM32Cube :
Keil :
I checked and double checked the program on both Keil and STM32Cube, but I can't see a single difference...
Could anyone please give me some help ? Or at least advice ?
Thanks !

