1 <!-- HTML header for doxygen 1.9.6-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=11"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>CMSIS-Core (Cortex-A): System Configuration Files system_<Device>.c and system_<Device>.h</title>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <script type="text/javascript" src="tabs.js"></script>
13 <script type="text/javascript" src="footer.js"></script>
14 <script type="text/javascript" src="navtree.js"></script>
15 <link href="navtree.css" rel="stylesheet" type="text/css"/>
16 <script type="text/javascript" src="resize.js"></script>
17 <script type="text/javascript" src="navtreedata.js"></script>
18 <script type="text/javascript" src="navtree.js"></script>
19 <link href="search/search.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="search/searchdata.js"></script>
21 <script type="text/javascript" src="search/search.js"></script>
22 <script type="text/javascript">
23 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
24 $(document).ready(function() { init_search(); });
27 <script type="text/javascript" src="darkmode_toggle.js"></script>
28 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
29 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
30 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
31 <link href="extra_tabs.css" rel="stylesheet" type="text/css"/>
32 <link href="version.css" rel="stylesheet" type="text/css"/>
33 <script type="text/javascript" src="../../version.js"></script>
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
40 <tr style="height: 55px;">
41 <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
42 <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
43 <div id="projectname">CMSIS-Core (Cortex-A)
44  <span id="projectnumber"><script type="text/javascript">
46 writeHeader.call(this);
47 writeVersionDropdown.call(this, "CMSIS-Core (Cortex-A)");
52 <div id="projectbrief">CMSIS-Core support for Cortex-A processor-based devices</div>
54 <td> <div id="MSearchBox" class="MSearchBoxInactive">
56 <span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
57 <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
58 onfocus="searchBox.OnSearchFieldFocus(true)"
59 onblur="searchBox.OnSearchFieldFocus(false)"
60 onkeyup="searchBox.OnSearchFieldChange(event)"/>
61 </span><span class="right">
62 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
66 <!--END !PROJECT_NAME-->
71 <!-- end header part -->
72 <div id="CMSISnav" class="tabs1">
74 <script type="text/javascript">
75 writeComponentTabs.call(this);
79 <script type="text/javascript">
80 writeSubComponentTabs.call(this);
82 <!-- Generated by Doxygen 1.9.6 -->
83 <script type="text/javascript">
84 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
85 var searchBox = new SearchBox("searchBox", "search/",'.html');
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
91 <div id="nav-tree-contents">
92 <div id="nav-sync" class="sync"></div>
95 <div id="splitbar" style="-moz-user-select:none;"
96 class="ui-resizable-handle">
99 <script type="text/javascript">
100 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
101 $(document).ready(function(){initNavTree('system_c_pg.html',''); initResizable(); });
104 <div id="doc-content">
105 <!-- window showing the filter options -->
106 <div id="MSearchSelectWindow"
107 onmouseover="return searchBox.OnSearchSelectShow()"
108 onmouseout="return searchBox.OnSearchSelectHide()"
109 onkeydown="return searchBox.OnSearchSelectKey(event)">
112 <!-- iframe showing the search results (closed by default) -->
113 <div id="MSearchResultsWindow">
114 <div id="MSearchResults">
117 <div id="SRResults"></div>
118 <div class="SRStatus" id="Loading">Loading...</div>
119 <div class="SRStatus" id="Searching">Searching...</div>
120 <div class="SRStatus" id="NoMatches">No Matches</div>
126 <div><div class="header">
127 <div class="headertitle"><div class="title">System Configuration Files system_<Device>.c and system_<Device>.h </div></div>
129 <div class="contents">
130 <div class="textblock"><p>The <a class="el" href="system_c_pg.html">System Configuration Files system_<Device>.c and system_<Device>.h</a> provides as a minimum the functions described under <a class="el" href="group__system__init__gr.html">System and Clock Configuration</a>. These functions are device specific and need adaptations. In addition, the file might have configuration settings for the device such as XTAL frequency or PLL prescaler settings.</p>
131 <p>For devices with external memory BUS the system_<Device>.c also configures the BUS system.</p>
132 <p>The silicon vendor might expose other functions (i.e. for power configuration) in the system_<Device>.c file.</p>
133 <p>In case of additional features the function prototypes need to be added to the system_<Device>.h header file.</p>
134 <h1><a class="anchor" id="system_Device_sec"></a>
135 system_Device.c Template File</h1>
136 <p>The <a class="el" href="system_c_pg.html#system_Device_sec">system_Device.c Template File</a> is shown below.</p>
137 <pre class="fragment">/******************************************************************************
138 * @file system_<Device>.c
139 * @brief CMSIS Cortex-A Device Peripheral Access Layer
141 * @date 10. January 2018
142 ******************************************************************************/
144 * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
146 * SPDX-License-Identifier: Apache-2.0
148 * Licensed under the Apache License, Version 2.0 (the License); you may
149 * not use this file except in compliance with the License.
150 * You may obtain a copy of the License at
152 * www.apache.org/licenses/LICENSE-2.0
154 * Unless required by applicable law or agreed to in writing, software
155 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
156 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157 * See the License for the specific language governing permissions and
158 * limitations under the License.
161 #include <stdint.h>
162 #include "<Device>.h" /* ToDo: replace '<Device>' with your device name */
163 #include "irq_ctrl.h"
165 /*----------------------------------------------------------------------------
167 *----------------------------------------------------------------------------*/
168 /* ToDo: add here your necessary defines for device initialization
169 following is an example for different system frequencies */
170 #define XTAL (12000000U) /* Oscillator frequency */
172 #define SYSTEM_CLOCK (5 * XTAL)
175 /*----------------------------------------------------------------------------
176 System Core Clock Variable
177 *----------------------------------------------------------------------------*/
178 /* ToDo: initialize SystemCoreClock with the system core clock frequency value
179 achieved after system intitialization.
180 This means system core clock frequency after call to SystemInit() */
181 uint32_t SystemCoreClock = SYSTEM_CLOCK; /* System Clock Frequency (Core Clock)*/
185 /*----------------------------------------------------------------------------
187 *----------------------------------------------------------------------------*/
189 void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */
191 /* ToDo: add code to calculate the system frequency based upon the current
193 This function can be used to retrieve the system core clock frequeny
194 after user changed register sittings. */
195 SystemCoreClock = SYSTEM_CLOCK;
199 /*----------------------------------------------------------------------------
200 System Initialization
201 *----------------------------------------------------------------------------*/
202 void SystemInit (void)
204 /* ToDo: add code to initialize the system
205 Do not use global variables because this function is called before
206 reaching pre-main. RW section may be overwritten afterwards. */
207 SystemCoreClock = SYSTEM_CLOCK;
209 // Invalidate entire Unified TLB
212 // Invalidate entire branch predictor array
217 // Invalidate instruction cache and flush branch target cache
222 // Invalidate data cache
223 L1C_InvalidateDCacheAll();
225 // Create Translation Table
226 MMU_CreateTranslationTable();
235 #if (__L2C_PRESENT == 1)
240 #if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
248 </pre><h1><a class="anchor" id="system_Device_h_sec"></a>
249 system_Device.h Template File</h1>
250 <p>The system_<Device>.h header file contains prototypes to access the public functions in the system_<device>.c file. The <a class="el" href="system_c_pg.html#system_Device_h_sec">system_Device.h Template File</a> is shown below.</p>
251 <pre class="fragment">/**************************************************************************//**
252 * @file system_<Device>.h
253 * @brief CMSIS Cortex-A Device Peripheral Access Layer
255 * @date 10. January 2018
256 ******************************************************************************/
258 * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
260 * SPDX-License-Identifier: Apache-2.0
262 * Licensed under the Apache License, Version 2.0 (the License); you may
263 * not use this file except in compliance with the License.
264 * You may obtain a copy of the License at
266 * www.apache.org/licenses/LICENSE-2.0
268 * Unless required by applicable law or agreed to in writing, software
269 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
270 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
271 * See the License for the specific language governing permissions and
272 * limitations under the License.
275 #ifndef SYSTEM_<Device>_H /* ToDo: replace '<Device>' with your device name */
276 #define SYSTEM_<Device>_H
282 #include <stdint.h>
284 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
287 \brief Setup the microcontroller system.
289 Initialize the System and update the SystemCoreClock variable.
291 extern void SystemInit (void);
294 \brief Update SystemCoreClock variable.
296 Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
298 extern void SystemCoreClockUpdate (void);
301 \brief Create Translation Table.
303 Creates Memory Management Unit Translation Table.
305 extern void MMU_CreateTranslationTable(void);
311 #endif /* SYSTEM_<Device>_H */
312 </pre> </div></div><!-- contents -->
313 </div><!-- PageDoc -->
314 </div><!-- doc-content -->
315 <!-- start footer part -->
316 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
319 <script type="text/javascript">
321 writeFooter.call(this);