RL78/G13 Clock Generator (Clock Switching) CC-RL
R01AN2831EJ0100 Rev. 1.00 Page 18 of 51
May 28, 2015
[Function Name] R_TAU0_Channel0_GetParameter
Synopsis
Gets parameters of channel 0 of TAU0.
Header
#include "r_cg_macrodriver.h"
#include "r_cg_timer.h"
#include "r_cg_userdefine.h"
Declaration
void R_TAU0_Channel0_GetParameter(uint8_t status, uint8_t *p_clkdiv, uint16_t *p_count)
Explanation
Gets and stores the parameters associated with the clock status specified in an argument in
p_clkdiv, p_count.
p_clkdiv Loaded with the frequency division ratio of the operation clock for channel 0 of
TAU0.
p_count Loaded with the count value of channel 0 of TAU0.
Arguments
First argument: status
: Clock status (1 to 3)
Specify one of the following constants:
X1_STATUS
Gets parameters for X1 oscillation clock.
XT1_STATUS
Gets parameters for XT1 oscillation clock.
HOCO_STATUS
Gets parameters for HOCO clock.
Second argument: *p_clkdiv
: Loaded with the frequency division ratio of the
operation clock for channel 0 of TAU0.
Third argument: *p_count
: Loaded with the count value of channel 0 of
TAU0.
Return value
None
Remarks
p_clkdiv and p_count are the first and second arguments of R_TAU0_Channel0_Restart,
respectively.
[ Function Name ] R_CGC_StopClock
Synopsis
Stops clock.
Header
#include "r_cg_macrodriver.h"
#include "r_cg_cgc.h"
#include "r_cg_userdefine.h"
Declaration
void R_CGC_StopClock(uint8_t status)
Explanation
Stops the clock specified in the argument.
Arguments
First argument: status
: Clock to stop (1 to 3)
Specify one of the following constants:
X1_STATUS
XT1_STATUS
Stops HOCO.
HOCO_STATUS
Does nothing (because the old XT1 oscillation
clock always oscillates.)
Return value
None
Remarks
None