STM32WB HW_TS_RTC_Wakeup_Handler Is Generating Hard Faults Whenever Called
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-12 9:29 AM
Hello! I'm trying to run the BLE Heart Rate application on my STM32WB.
I followed the guides and YT videos, but whenever the HW_TS_RTC_Wakeup_Handler interrupt is triggered, the device goes into a Hard Fault state at ' __HAL_RTC_WRITEPROTECTION_DISABLE( phrtc );'
I've tried several things to get the fault to clear such as replacing '_HAL_RTC_WRITE...' with 'LL_RTC_DisableWriteProtection(RTC); // This works! but then a hard fault is generated at '_HAL_RTC_WAKEUPTIMER_DISABLE'
I'm not quite sure, but I have a sneaky suspicion that that the phrtc pointer may not be correct...
Has anyone run into this issue before? I also tried disabling RTC tamper, but this causes the interrupt to just never be called.
Thanks! :)
- Labels:
-
BLE
-
RTC
-
STM32WB series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-12 9:41 AM
Debug your program and see where phrtc points when __HAL_RTC_WRITEPROTECTION_DISABLE is called.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-12 11:52 AM
Yep, it's an empty pointer... I'm confused as to why though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-12 12:09 PM
Set up a watchpoint on the pointer location and see what changes it. Ensure it’s initialized correctly in the first place.
