Some questions about board-specific example codes
Background
I have developed firmware for a LoRaWAN device by modifying the LoRaWAN_End_Node example for the B-WL5M-SUBG1 development board, which was extracted from the STM32Cube MCU Package for STM32WL series (v.1.3.0) from ST's website (not through CubeIDE). Based on this, I have further developed a custom PCB containing the STM32WL5MOC and other peripherals (antennae, RTC, LEDs, buzzers, etc.).
Situation
To test the custom board, I have flashed the STM32 chip with a simple firmware which toggles the GPIO pins based on button presses - this works as intended. However, when I flash the LoRaWAN_End_Node example for B-WL5M-SUBG1 (downloaded from STM32CubeIDE v.1.18.1) onto the STM32 chip, the device was able to join the LoRaWAN network once, but failed subsequent joins due to a repeated nonce. After numerous failed attempts at fixing this, I went back to the example code downloaded from CubeIDE, and now my LoRaWAN server cannot even receive a join request.
When looking at the current instruction pointer in debug mode, I have noticed that the programme has entered the error handler from somewhere before the main loop is run.
Questions
1. Is there a function in CubeIDE to trace the instruction pointer?
2. Are example codes board specific, i.e. they will not run if I do not use the board it is written for?
3. If the answer to Q2 is yes, then why did the code work once at the very beginning?
I am still new to STM32 development, please keep the answers simple. Thank you!
