raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.24k stars 837 forks source link

HARDFAULT HANDLER IN PICO-SDK !!! #1727

Closed ParthParekh01 closed 3 weeks ago

ParthParekh01 commented 3 weeks ago

Hello everyone,

I'm encountering a hardfault issue with my Raspberry Pi Pico SDK project. My controller gets stuck in a hardfault state, and I am unsure how to handle it properly. Ideally, I would expect the controller to reset itself after a hardfault, but instead, it remains stuck, requiring a manual reset to resume operation.

Here are some details of my setup:

Device: Raspberry Pi Pico W Development Environment: Arduino IDE 2.0 SDK Version: Raspberry Pi Pico SDK 1.5.1 Debugging Tool: Official Raspberry Pi Debug Probe

Has anyone else faced a similar issue, or does anyone know of an implementation of isr_hardfault in the Raspberry Pi Pico SDK that I can utilize to handle this more effectively? Any insights or suggestions on resolving this would be greatly appreciated.

Below is the provided hardfault log . hardfault_img

My major concern is regarding the IMPLEMENTATION OF HARDFAULT HANDLER IN PICO-SDK .

Thank you!

peterharperuk commented 3 weeks ago

This is a forum for issues. Try posting questions to the forum https://forums.raspberrypi.com/viewforum.php?f=145 However I suggest you look into the use of watchdogs https://github.com/raspberrypi/pico-examples/blob/master/watchdog/hello_watchdog/hello_watchdog.c