source: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.c@ 270

Last change on this file since 270 was 270, checked in by coas-nagasima, 7 years ago

mruby版ECNLプロトタイピング・ツールを追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 5.5 KB
Line 
1/*******************************************************************************
2* DISCLAIMER
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
19* following link:
20* http://www.renesas.com/disclaimer
21* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
22*******************************************************************************/
23/**************************************************************************//**
24* @file RZ_A1_Init.c
25* $Rev: 624 $
26* $Date:: 2013-04-24 13:37:48 +0900#$
27* @brief RZ_A1 Initialize
28******************************************************************************/
29
30/******************************************************************************
31Includes <System Includes> , "Project Includes"
32******************************************************************************/
33#include "MBRZA1H.h"
34#include "RZ_A1_Init.h"
35
36/******************************************************************************
37Typedef definitions
38******************************************************************************/
39
40/******************************************************************************
41Macro definitions
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)
45
46#define GPIO_PORT0_BOOTMODE_BITMASK (0x000fu)
47
48/******************************************************************************
49Imported global variables and functions (from other files)
50******************************************************************************/
51
52/******************************************************************************
53Exported global variables and functions (to be accessed by other files)
54******************************************************************************/
55
56/******************************************************************************
57Private global variables and functions
58******************************************************************************/
59
60/**************************************************************************//**
61* Function Name: RZ_A1_SetSramWriteEnable
62* @brief Initialize Board settings
63*
64* Description:<br>
65* Set SRAM write enable
66* @param none
67* @retval none
68******************************************************************************/
69void RZ_A1_SetSramWriteEnable(void)
70{
71 /* Enable SRAM write access */
72 CPG.SYSCR3 = 0x0F;
73
74 return;
75}
76
77/**************************************************************************//**
78* Function Name: RZ_A1_InitClock
79* @brief Initialize Board settings
80*
81* Description:<br>
82* Initialize Clock
83* @param none
84* @retval none
85******************************************************************************/
86void RZ_A1_InitClock(void)
87{
88 /* Cancel L2C standby status before clock change */
89 L2CREG15_POWER_CTRL = 0x00000001;
90
91 /* Clock settings */
92 /* ClockMode0 */
93 CPG.FRQCR = 0x1035; /* CPU Clock =399.99MHz */
94 CPG.FRQCR2 = 0x0001; /* G Clock =266.66MHz */
95
96 return;
97}
98
99/**************************************************************************//**
100* Function Name: RZ_A1_IsClockMode0
101* @brief Query Clock Mode
102*
103* Description:<br>
104* Answer ClockMode0 or not
105* @param none
106* @retval true : clock mode 0
107* @retval false : clock mode 1
108******************************************************************************/
109int RZ_A1_IsClockMode0(void)
110{
111 /* ClockMode0 */
112 return true;
113}
114
115/**************************************************************************//**
116* Function Name: RZ_A1_InitBus
117* @brief Initialize Bus
118*
119* Description:<br>
120* Initialize Pin Setting
121* @param none
122* @retval none
123******************************************************************************/
124void RZ_A1_InitBus(void)
125{
126 /*************************************************************************/
127 /* If need Pin Setting before run program, the setting will be wrote here*/
128 /*************************************************************************/
129
130 return;
131}
132
133/******************************************************************************
134End of file
135******************************************************************************/
Note: See TracBrowser for help on using the repository browser.