Files
microchip-application-pec93…/Examples/wdg/wdg_count

wdg_count

This is an example of WDG count

  • Select the toggle output gpio pins

    // in main.c
    #define CONFIG_TOGGLE_PORT  GPIOA
    #define CONFIG_TOGGLE_PIN   GPIO_Pin_02
    
  • Configure the parameters related to WDG

  • It can be modified according to the requirements

    // in main.c
    #define CONFIG_WDG_RELAOD_VALUE  (32000 - 1)
    WDG_Reset_Dis	//WDG reset disable
    WDG_Debug_Dis	//WDG debug disable
    

Log

  • Enable the WDG interrupt
  • In the interrupt function, clear the watchdog overflow and flip the GPIO output