Skip to main content
AndyR1
Senior
February 1, 2022
Solved

How to watchdog handler on BlueNRG-LP ?

  • February 1, 2022
  • 2 replies
  • 966 views

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.

    This topic has been closed for replies.
    Best answer by AndyR1

    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

    2 replies

    Sebastien DENOUAL
    ST Employee
    February 3, 2022

    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
    AndyR1AuthorBest answer
    Senior
    February 3, 2022

    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