Everything

Usage example

Use timer as One-shot timer.

 

[GUI setting example]

TimerKB2

Used

KB2

Used

TKB20

Used

TKB20

Standalone mode (period controlled by TKBCR00

Clock setting

TKBTCK0 selected

Operation clock setting

fCLK

Pulse period

1ms(Actual value1)

Duty (TKBO00 output)

0(%)(Actual value0)

Duty (TKBO01 output)

0(%)(Actual value0)

Delay (TKBO01 output)

0(%)(Actual value0)

PWM output smooth start function of TKBO00 setting

Unused

PWM output smooth start function of TKBO01 setting

Unused

PWM output dithering function of TKBO00 setting

Unused

PWM output dithering function of TKBO01 setting

Unused

TKBTGCR0 value

0

TKBO00 output setting

Disabled

TKBO01 output setting

Disabled

End of timer KB20 count interrupt (INTTKB20)

Used

Priority

Low

Forced output stop function setting (TKBO00)

Disabled

Forced output stop function setting (TKBO01)

Disabled

 

 

[API setting example]

r_cg_main.c

void main(void)

{

       R_MAIN_UserInit();

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

       /* Start KB20 module operation */

       R_KB20_Start();

 

       while (1U)

       {

              ;

       }

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

}

 

r_cg_kb2_user.c

static void __near r_kb20_interrupt(void)

{

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

       /* Stop KB20 module operation */

       R_KB20_Stop();

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

}