Everything

Usage example

Stop the timer when TRX register overflows.

 

[GUI setting example]

TimerRX

Used

TMRX

Used

Timer RX operation setting

Used

Clock setting

fCLK

Count start source setting

Software

Software reset enable signal setting

Enables software to reset counting

Comparator 1 trigger setting

Transfer timer RX counter value to timer RX count buffer register. Set 0000H to timer RX count value, and continue counting

Enable TRX overflow interrupt (INTTRX)

Used

Priority

Low/ level3 (low priority level)

 

 

[API setting example]

r_cg_main.c

void main(void)

{

       R_MAIN_UserInit();

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

       /* Start TMRX counter */

       R_TMRX_Start();

 

       while (1U)

       {

              ;

       }

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

}

 

r_cg_tmrx_user.c

static void __near r_tmrx_interrupt(void)

{

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

       /* Stop TMRX counter */

       R_TMRX_Stop();

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

}