cancel
Showing results for 
Search instead for 
Did you mean: 

How to watchdog handler on BlueNRG-LP ?

AndyR1
Senior

Hello,

With BlueNRG1/2, we got the WEAK_FUNCTION(void WDG_Handler(void) {}); in system_bluenrg1.c, but with BlueNRG-LP there is no wdg handler in system_BlueNRG_LP.c, so is it possible to have it in any way ?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
AndyR1
Senior

Hello @Sebastien DENOUAL​ ,

Thank you for answer, this example is to inform the reason after a reset, I was looking for a function when WDG reach 0, execute some code and then reset. I guess it's not possible on bluenrg-LP as the WDG is fully independent and directly connected to reset, this is a more secure version, unlike in bluenrg1/2 where there is WDG interrupt(so need to run code...)0693W00000JORb8QAH.png

View solution in original post

2 REPLIES 2
Sebastien DENOUAL
ST Employee

Hi @Community member​ ,

There is a code example in BlueNRG-LP showing usage of independant WDG.

...\BlueNRG-LP DK1.1.0\Projects\Peripheral_Examples\Examples_HAL\IWDG\IWDG_Reset

Concept is to check Reset Reason code at startup.

Reset reason is stored in RAM_VR virtual register.

In case of reset because of watchdog,

in RAM_VR.ResetReason, RCC_FLAG_WDGRST should be high.

Regards,

Sebastien.

AndyR1
Senior

Hello @Sebastien DENOUAL​ ,

Thank you for answer, this example is to inform the reason after a reset, I was looking for a function when WDG reach 0, execute some code and then reset. I guess it's not possible on bluenrg-LP as the WDG is fully independent and directly connected to reset, this is a more secure version, unlike in bluenrg1/2 where there is WDG interrupt(so need to run code...)0693W00000JORb8QAH.png