This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hard fault

Hi,

I'm working on a project using a custom pcb with a 52832 chip. It has worked good for several months, but I got a Hard Fault during flashing today. Flashed it 3 times before doing a "erase all" in SEGGER. Next time I flashed it, it fails to run because of the hard fault. How do I proceed my troubleshooting to solve this?

Results from debug terminal:

Debug terminal

Thanks,

Arild

Parents
  • Hi Arild, 

    I see you have already included the hardfault handling library, which is a good start. The log indicates that the fault occurred at address 0x2a912 (is unaligned) and that this happened while being inside the PendSV_IRQn interrupt.  Have you tried to repeat this to see if it always triggered in this interrupt context (ie last byte of PSR==0xe)? Also, do you have an RTOS that uses the PendSV_IRQn, or is it something else?

    Best regards,

    Vidar

  • In some strange way the system started working again and I dont know why. Disconnected some external pcb's and sensors and  ran a blinky example with no faults. Connected it back up and flashed the original software and it runs like before. Could some bad connections or shortings cause this issue?

  • Hi Steri,

    I took this case, since it seems a bit interesting.

    It seems very strange that you have not changed the code and the app starting failing randomly. And disconnecting some external PCB and sensors made it work. Can you be absolutely sure if it was the external PCB's and sensors that caused it by connecting them back and see if it causes the fault.

    We need to get a direction to debug here and based on the behavior of the app that you mentioned, it seems very confusing.

Reply
  • Hi Steri,

    I took this case, since it seems a bit interesting.

    It seems very strange that you have not changed the code and the app starting failing randomly. And disconnecting some external PCB and sensors made it work. Can you be absolutely sure if it was the external PCB's and sensors that caused it by connecting them back and see if it causes the fault.

    We need to get a direction to debug here and based on the behavior of the app that you mentioned, it seems very confusing.

Children
Related