Use timer as One-shot timer.
[GUI setting example]
8bit interval timer |
Used | |||
IT8bit0 |
Used | |||
Channel0 |
Used | |||
Channel 0 |
8 bit | |||
Interval timer operation setting |
Auto | |||
Interval value |
100ms (Actual value:7.8125) | |||
Detection of compare match (INTIT00) |
Used | |||
Priority |
Low |
[API setting example]
r_cg_main.c
void main(void)
{
R_MAIN_UserInit();
/* Start user code. Do not edit comment generated here */
/* Start 8 bit interval timer unit0 Channel0 operation */
R_IT8Bit0_Channel0_Start();
while (1U)
{
;
}
/* End user code. Do not edit comment generated here */
}
r_cg_it8bit_user.c
static void __near r_it8bit0_channel0_interrupt(void)
{
/* Start user code. Do not edit comment generated here */
/* Stop 8 bit interval timer unit0 Channel0 operation */
R_IT8Bit0_Channel0_Stop();
/* End user code. Do not edit comment generated here */
}