2021-12-12 09: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! 🙂
2021-12-12 09:41 AM
Debug your program and see where phrtc points when __HAL_RTC_WRITEPROTECTION_DISABLE is called.
2021-12-12 11:52 AM
Yep, it's an empty pointer... I'm confused as to why though.
2021-12-12 12:09 PM