Everything

Usage example

Clear the flag in the interval interrupt of Watchdog timer when the flag is ‘1’.

 

[GUI setting example]

Watchdog timer

Used

WDT

Used

Watchdog timer operation setting

Used

Operation in HALT/STOP/SNOOZE mode setting

Enabled

Overflow time

136.53 (2^11/fWDT)(ms)

Window open period

100(%)

Enable interval interrupt when 75%  + 1/2fIL of overflow time (INTWDTI)

Used

Priority

Low

 

 

[API setting example]

r_main.c

void main(void)

{

       R_MAIN_UserInit();

       /* Start user code. Do not edit comment generated here */

       while (1U)

       {

              /* Restart the watchdog timer */

              R_WDT_Restart();

       }

       /* End user code. Do not edit comment generated here */

}

 

r_cg_wdt_user.c

/* Start user code for global. Do not edit comment generated here */

volatile uint8_t g_wdt_f;

/* End user code. Do not edit comment generated here */

 

static void __near r_wdt_interrupt(void)

{

       /* Start user code. Do not edit comment generated here */

       if(g_wdt_f == 1U)

       {

              /* Restart the watchdog timer */

              R_WDT_Restart();

       }

       /* End user code. Do not edit comment generated here */

}