]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.c
1 /*******************************************************************************
3 * This software is supplied by Renesas Electronics Corporation and is only
4 * intended for use with Renesas products. No other uses are authorized. This
5 * software is owned by Renesas Electronics Corporation and is protected under
6 * all applicable laws, including copyright laws.
7 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
8 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
9 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
10 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
11 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
12 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
13 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
14 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
15 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
16 * Renesas reserves the right, without notice, to make changes to this software
17 * and to discontinue the availability of this software. By using this software,
18 * you agree to the additional terms and conditions found by accessing the
20 * http://www.renesas.com/disclaimer
21 * Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
22 *******************************************************************************/
23 /**************************************************************************//**
26 * $Date:: 2013-04-24 13:37:48 +0900#$
27 * @brief RZ_A1 Initialize
28 ******************************************************************************/
30 /******************************************************************************
31 Includes <System Includes> , "Project Includes"
32 ******************************************************************************/
34 #include "RZ_A1_Init.h"
36 /******************************************************************************
38 ******************************************************************************/
40 /******************************************************************************
42 ******************************************************************************/
43 #define CS2_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFD040)
44 #define CS3_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFE040)
46 #define GPIO_PORT0_BOOTMODE_BITMASK (0x000fu)
48 /******************************************************************************
49 Imported global variables and functions (from other files)
50 ******************************************************************************/
52 /******************************************************************************
53 Exported global variables and functions (to be accessed by other files)
54 ******************************************************************************/
56 /******************************************************************************
57 Private global variables and functions
58 ******************************************************************************/
60 /**************************************************************************//**
61 * Function Name: RZ_A1_SetSramWriteEnable
62 * @brief Initialize Board settings
65 * Set SRAM write enable
68 ******************************************************************************/
69 void RZ_A1_SetSramWriteEnable(void)
71 /* Enable SRAM write access */
77 /**************************************************************************//**
78 * Function Name: RZ_A1_InitClock
79 * @brief Initialize Board settings
85 ******************************************************************************/
86 void RZ_A1_InitClock(void)
88 /* Cancel L2C standby status before clock change */
89 L2CREG15_POWER_CTRL
= 0x00000001;
93 CPG
.FRQCR
= 0x1035; /* CPU Clock =399.99MHz */
94 CPG
.FRQCR2
= 0x0001; /* G Clock =266.66MHz */
99 /**************************************************************************//**
100 * Function Name: RZ_A1_IsClockMode0
101 * @brief Query Clock Mode
104 * Answer ClockMode0 or not
106 * @retval true : clock mode 0
107 * @retval false : clock mode 1
108 ******************************************************************************/
109 int RZ_A1_IsClockMode0(void)
115 /**************************************************************************//**
116 * Function Name: RZ_A1_InitBus
117 * @brief Initialize Bus
120 * Initialize Pin Setting
123 ******************************************************************************/
124 void RZ_A1_InitBus(void)
126 /*************************************************************************/
127 /* If need Pin Setting before run program, the setting will be wrote here*/
128 /*************************************************************************/
133 /******************************************************************************
135 ******************************************************************************/