RX230 Group, RX231 Group
Initial Settings and Usage Procedure of RTC Battery Backup Function
R01AN4831EJ0100 Rev.1.00
Page 7 of 23
Aug.20.19
1.2 Operating Environment
Table 1.2, Operating Environment, shows the environment in which the operation of the sample program was
confirmed.
Table 1.2 Operating Environment
Item
Description
MCU used
R5F52318ADFP (RX231 Group)
Board used
Renesas Starter Kit for RX231 (product number: R0K505231S000BE)
CPU operating frequency
Refer to 2.3, Clock Settings.
Integrated development
environment
Renesas Electronics
e
2
studio Version 7.5.0
C compiler
Renesas Electronics
C/C++ Compiler Package for RX Family V.3.01.00
Emulator
E1
Endian order
Little-endian
The sample program uses FIT modules to control battery backup function and programming of the flash
memory. LCD display software uses the sample code provided with the RSK board, and the drivers of other
functions than battery backup and flash programming are generated using Smart Configurator (SC). Note
that in the sample program, R_Config_RTC_Create function call, which is generated for RTC battery backup
operation by SC, r_cg_hardware_setup.c file is deleted.
void R_Systeminit(void)
{
/* Enable writing to registers related to operating modes, LPC, CGC and
software reset */
SYSTEM.PRCR.WORD = 0xA50FU;
/* Enable writing to MPC pin function control registers */
MPC.PWPR.BIT.B0WI = 0U;
MPC.PWPR.BIT.PFSWE = 1U;
/* Initialize clocks settings */
R_CGC_Create();
/* Set peripheral settings */
R_Config_PORT_Create();
R_Config_CMT0_Create();
R_Config_LVD1_Create();
R_Config_SCI8_Create();
R_Config_RTC_Create();
← Deleted.
Figure 1.3 Modification of r_cg_hardware_setup.c