2024-06-09 06:29 AM - last edited on 2024-06-10 03:49 AM by SofLit
When Debugging the code in STM32 Cube IDE, the program execution flow directly goes into the HardFault Handler. The Debugging starts at HardFault Handler and I don't know why? Also this happened when I am trying to interface Sx1262 LoRa Module with STM32L496ZGTP. If anyone have come across similar issues please help me in this concern.
Thank You
Solved! Go to Solution.
2024-06-10 03:45 AM - edited 2024-06-10 03:46 AM
@SofLit The issue is resolved. I did not write the return condition in all the functions properly with pointers. The actual issue was that, before that I did dereference a NULL pointer. So since I wrote a condition in all the functions involving pointers, the Hard Fault was omitted. Thanks for the reply.
2024-06-09 06:47 AM
Perhaps you can just unpack the processor registers and see what it's objecting too?
Likely to be unrelated to the use of the SX1262, and everything to do with your code, buffers, alignment, etc.
2024-06-09 09:08 PM
Thanks @Tesla DeLorean . I want an example code integrating Sx1262 with STM32. I tried many examples but couldn't find a suitable one. Please if you know any code let me know.
Thanks
2024-06-10 01:22 AM
Hello,
What about the stack size? did you try to increase it?
2024-06-10 03:45 AM - edited 2024-06-10 03:46 AM
@SofLit The issue is resolved. I did not write the return condition in all the functions properly with pointers. The actual issue was that, before that I did dereference a NULL pointer. So since I wrote a condition in all the functions involving pointers, the Hard Fault was omitted. Thanks for the reply.