1 /***********************************************************************************************************************
\r
3 * This software is supplied by Renesas Electronics Corporation and is only
\r
4 * intended for use with Renesas products. No other uses are authorized. This
\r
5 * software is owned by Renesas Electronics Corporation and is protected under
\r
6 * all applicable laws, including copyright laws.
\r
7 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
\r
8 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
\r
9 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
\r
10 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
\r
11 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
\r
12 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
\r
13 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
\r
14 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
\r
15 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
\r
16 * Renesas reserves the right, without notice, to make changes to this software
\r
17 * and to discontinue the availability of this software. By using this software,
\r
18 * you agree to the additional terms and conditions found by accessing the
\r
20 * http://www.renesas.com/disclaimer
\r
22 * Copyright (C) 2013 Renesas Electronics Corporation. All rights reserved.
\r
23 ***********************************************************************************************************************/
\r
25 /***********************************************************************************************************************
\r
26 * File Name : r_cg_hardware_setup.c
\r
27 * Version : Applilet4 for RX64M V1.00.00.00 [02 Aug 2013]
\r
28 * Device(s) : R5F564MLHxFC
\r
30 * Description : This file implements system initializing function.
\r
31 * Creation Date: 07/02/2014
\r
32 ***********************************************************************************************************************/
\r
34 /***********************************************************************************************************************
\r
36 ***********************************************************************************************************************/
\r
37 /* Start user code for pragma. Do not edit comment generated here */
\r
38 /* End user code. Do not edit comment generated here */
\r
40 /***********************************************************************************************************************
\r
42 ***********************************************************************************************************************/
\r
43 #include "r_cg_macrodriver.h"
\r
44 #include "r_cg_cgc.h"
\r
45 #include "r_cg_cmt.h"
\r
46 /* Start user code for include. Do not edit comment generated here */
\r
47 /* End user code. Do not edit comment generated here */
\r
48 #include "r_cg_userdefine.h"
\r
50 /***********************************************************************************************************************
\r
51 Global variables and functions
\r
52 ***********************************************************************************************************************/
\r
53 /* Start user code for global. Do not edit comment generated here */
\r
54 /* End user code. Do not edit comment generated here */
\r
56 /***********************************************************************************************************************
\r
57 * Function Name: R_Systeminit
\r
58 * Description : This function initializes every macro.
\r
60 * Return Value : None
\r
61 ***********************************************************************************************************************/
\r
62 void R_Systeminit(void)
\r
64 /* Enable writing to registers related to operating modes, LPC, CGC and software reset */
\r
65 SYSTEM.PRCR.WORD = 0xA50BU;
\r
67 /* Enable writing to MPC pin function control registers */
\r
68 MPC.PWPR.BIT.B0WI = 0U;
\r
69 MPC.PWPR.BIT.PFSWE = 1U;
\r
71 /* Set peripheral settings */
\r
74 /* Disable writing to MPC pin function control registers */
\r
75 MPC.PWPR.BIT.PFSWE = 0U;
\r
76 MPC.PWPR.BIT.B0WI = 1U;
\r
78 /* Enable protection */
\r
79 SYSTEM.PRCR.WORD = 0xA500U;
\r
81 /***********************************************************************************************************************
\r
82 * Function Name: HardwareSetup
\r
83 * Description : This function initializes hardware setting.
\r
85 * Return Value : None
\r
86 ***********************************************************************************************************************/
\r
87 void HardwareSetup(void)
\r
92 /* Start user code for adding. Do not edit comment generated here */
\r
93 /* End user code. Do not edit comment generated here */
\r