Everything

Usage example

Use timer as One-shot timer.

 

[GUI setting example]

Timer

Used

TAU0

Unused

WUTM

Used

16-bit wake-up timer operation setting

Used

Count clock setting

Auto

Interval value

100ms (Actual value100)

WUTM and WUTMCMP match, generate an interrupt  (INTWUTM)

Used

Priority(INTWUTM)

Low

 

[API setting example]

r_main.c

void main(void)

{

       R_MAIN_UserInit();

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

       /* Start WUTM counter */

       R_WUTM_Start();

 

       while (1U)

       {

              ;

       }

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

}

 

r_cg_timer_user.c

static void __near r_wutm_interrupt(void)

{

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

       /* Stop WUTM counter */

       R_WUTM_Stop();

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

}