]> begriffs open source - cmsis/blob - main/Core_A/device_h_pg.html
Update main branch documentation
[cmsis] / main / Core_A / device_h_pg.html
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">
4 <head>
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): Device Header File &lt;Device.h&gt;</title>
9 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
12 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
13 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="jquery.js"></script>
15 <script type="text/javascript" src="dynsections.js"></script>
16 <script type="text/javascript" src="printComponentTabs.js"></script>
17 <script type="text/javascript" src="footer.js"></script>
18 <script type="text/javascript" src="navtree.js"></script>
19 <link href="navtree.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="resize.js"></script>
21 <script type="text/javascript" src="navtreedata.js"></script>
22 <script type="text/javascript" src="navtree.js"></script>
23 <link href="search/search.css" rel="stylesheet" type="text/css"/>
24 <script type="text/javascript" src="search/searchdata.js"></script>
25 <script type="text/javascript" src="search/search.js"></script>
26 <script type="text/javascript">
27 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
28   $(document).ready(function() { init_search(); });
29 /* @license-end */
30 </script>
31 <script type="text/javascript" src="darkmode_toggle.js"></script>
32 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
33 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
34 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
35 <link href="version.css" rel="stylesheet" type="text/css" />
36 <script type="text/javascript" src="../../version.js"></script>
37 </head>
38 <body>
39 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
40 <div id="titlearea">
41 <table cellspacing="0" cellpadding="0">
42  <tbody>
43  <tr style="height: 55px;">
44   <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
45   <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
46    <div id="projectname">CMSIS-Core (Cortex-A)
47    &#160;<span id="projectnumber"><script type="text/javascript">
48      <!--
49      writeHeader.call(this);
50      writeVersionDropdown.call(this, "CMSIS-Core (Cortex-A)");
51      //-->
52     </script>
53    </span>
54    </div>
55    <div id="projectbrief">CMSIS-Core support for Cortex-A processor-based devices</div>
56   </td>
57    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
58         <span class="left">
59           <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
60           <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
61                onfocus="searchBox.OnSearchFieldFocus(true)" 
62                onblur="searchBox.OnSearchFieldFocus(false)" 
63                onkeyup="searchBox.OnSearchFieldChange(event)"/>
64           </span><span class="right">
65             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
66           </span>
67         </div>
68 </td>
69   <!--END !PROJECT_NAME-->
70  </tr>
71  </tbody>
72 </table>
73 </div>
74 <!-- end header part -->
75 <div id="CMSISnav" class="tabs1">
76   <ul class="tablist">
77     <script type="text/javascript">
78       writeComponentTabs.call(this);
79     </script>
80   </ul>
81 </div>
82 <script type="text/javascript">
83   writeSubComponentTabs.call(this);
84 </script>
85 <!-- Generated by Doxygen 1.9.6 -->
86 <script type="text/javascript">
87 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
88 var searchBox = new SearchBox("searchBox", "search/",'.html');
89 /* @license-end */
90 </script>
91 </div><!-- top -->
92 <div id="side-nav" class="ui-resizable side-nav-resizable">
93   <div id="nav-tree">
94     <div id="nav-tree-contents">
95       <div id="nav-sync" class="sync"></div>
96     </div>
97   </div>
98   <div id="splitbar" style="-moz-user-select:none;" 
99        class="ui-resizable-handle">
100   </div>
101 </div>
102 <script type="text/javascript">
103 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
104 $(document).ready(function(){initNavTree('device_h_pg.html',''); initResizable(); });
105 /* @license-end */
106 </script>
107 <div id="doc-content">
108 <!-- window showing the filter options -->
109 <div id="MSearchSelectWindow"
110      onmouseover="return searchBox.OnSearchSelectShow()"
111      onmouseout="return searchBox.OnSearchSelectHide()"
112      onkeydown="return searchBox.OnSearchSelectKey(event)">
113 </div>
114
115 <!-- iframe showing the search results (closed by default) -->
116 <div id="MSearchResultsWindow">
117 <div id="MSearchResults">
118 <div class="SRPage">
119 <div id="SRIndex">
120 <div id="SRResults"></div>
121 <div class="SRStatus" id="Loading">Loading...</div>
122 <div class="SRStatus" id="Searching">Searching...</div>
123 <div class="SRStatus" id="NoMatches">No Matches</div>
124 </div>
125 </div>
126 </div>
127 </div>
128
129 <div><div class="header">
130   <div class="headertitle"><div class="title">Device Header File &lt;Device.h&gt; </div></div>
131 </div><!--header-->
132 <div class="contents">
133 <div class="textblock"><p>The <a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</a> contains the following sections that are device specific:</p><ul>
134 <li><a class="el" href="device_h_pg.html#interrupt_number_sec">Interrupt Number Definition</a> provides interrupt numbers (IRQn) for all exceptions and interrupts of the device.</li>
135 <li><a class="el" href="device_h_pg.html#core_config_sect">Configuration of the Processor and Core Peripherals</a> reflect the features of the device.</li>
136 <li><a class="el" href="device_h_pg.html#device_access">Device Peripheral Access Layer</a> definitions for the <a class="el" href="group__peripheral__gr.html">Peripheral Access</a> to all device peripherals. It contains all data structures and the address mapping for device-specific peripherals.</li>
137 <li><b>Access Functions for Peripherals (optional)</b> provide additional helper functions for peripherals that are useful for programming of these peripherals. Access Functions may be provided as inline functions or can be extern references to a device-specific library provided by the silicon vendor.</li>
138 </ul>
139 <p><a href="modules.html"><b>Reference</b> </a> describes the standard features and functions of the <a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</a> in detail.</p>
140 <h1><a class="anchor" id="interrupt_number_sec"></a>
141 Interrupt Number Definition</h1>
142 <p><a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</a> contains the enumeration <a class="el" href="irq__ctrl_8h.html#ac62964c04a7fed2c84aeea9e34f415e2">IRQn_ID_t</a> that defines all exceptions and interrupts of the device. For devices implementing an Arm GIC these are defined as:</p><ul>
143 <li>IRQn 0-15 represents software generated interrupts (SGI), local to each processor core.</li>
144 <li>IRQn 16-31 represents private peripheral interrupts (PPI), local to each processor core.</li>
145 <li>IRQn 32-1019 represents shared peripheral interrupts (SPI), routable to all processor cores.</li>
146 <li>IRQn 1020-1023 represents special interrupts, refer to the GIC Architecture Specification.</li>
147 </ul>
148 <p><b>Example:</b></p>
149 <p>The following example shows the extension of the interrupt vector table for Cortex-A9 class device.</p>
150 <div class="fragment"><div class="line"><span class="keyword">typedef</span> <span class="keyword">enum</span> IRQn</div>
151 <div class="line">{</div>
152 <div class="line"><span class="comment">/******  SGI Interrupts Numbers                 ****************************************/</span></div>
153 <div class="line">  <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a056f32088a9c8bdb9309b005dfeb648e">SGI0_IRQn</a>            =  0,      </div>
154 <div class="line">  <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ab335b8b84021cd5714807d6cd2404c3b">SGI1_IRQn</a>            =  1,</div>
155 <div class="line">  <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a2a1cc64c0a2dc0e7f339fbf21c9a2b07">SGI2_IRQn</a>            =  2,</div>
156 <div class="line">       :                  :</div>
157 <div class="line">  <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ac6958eebc9d41a42c739de555cad2321">SGI15_IRQn</a>           = 15,</div>
158 <div class="line"> </div>
159 <div class="line"><span class="comment">/******  Cortex-A9 Processor Exceptions Numbers ****************************************/</span></div>
160 <div class="line">  GlobalTimer_IRQn     = 27,        </div>
161 <div class="line">  PrivTimer_IRQn       = 29,        </div>
162 <div class="line">  PrivWatchdog_IRQn    = 30,        </div>
163 <div class="line"><span class="comment">/******  Platform Exceptions Numbers ***************************************************/</span></div>
164 <div class="line">  Watchdog_IRQn        = 32,        </div>
165 <div class="line">  Timer0_IRQn          = 34,        </div>
166 <div class="line">  Timer1_IRQn          = 35,        </div>
167 <div class="line">  RTClock_IRQn         = 36,        </div>
168 <div class="line">  UART0_IRQn           = 37,        </div>
169 <div class="line">       :                  :</div>
170 <div class="line">       :                  :</div>
171 <div class="line">} <a class="code hl_enumeration" href="group__irq__ctrl__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a>;</div>
172 <div class="ttc" id="agroup__irq__ctrl__gr_html_ga7e1129cd8a196f4284d41db3e82ad5c8"><div class="ttname"><a href="group__irq__ctrl__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a></div><div class="ttdeci">IRQn_Type</div><div class="ttdoc">Definition of IRQn numbers.</div><div class="ttdef"><b>Definition:</b> Ref_IRQCtrl.txt:79</div></div>
173 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8a056f32088a9c8bdb9309b005dfeb648e"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a056f32088a9c8bdb9309b005dfeb648e">SGI0_IRQn</a></div><div class="ttdeci">@ SGI0_IRQn</div><div class="ttdoc">Software Generated Interrupt 0.</div><div class="ttdef"><b>Definition:</b> Ref_IRQCtrl.txt:82</div></div>
174 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8a2a1cc64c0a2dc0e7f339fbf21c9a2b07"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a2a1cc64c0a2dc0e7f339fbf21c9a2b07">SGI2_IRQn</a></div><div class="ttdeci">@ SGI2_IRQn</div><div class="ttdoc">Software Generated Interrupt 2.</div><div class="ttdef"><b>Definition:</b> Ref_IRQCtrl.txt:84</div></div>
175 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8ab335b8b84021cd5714807d6cd2404c3b"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ab335b8b84021cd5714807d6cd2404c3b">SGI1_IRQn</a></div><div class="ttdeci">@ SGI1_IRQn</div><div class="ttdoc">Software Generated Interrupt 1.</div><div class="ttdef"><b>Definition:</b> Ref_IRQCtrl.txt:83</div></div>
176 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8ac6958eebc9d41a42c739de555cad2321"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ac6958eebc9d41a42c739de555cad2321">SGI15_IRQn</a></div><div class="ttdeci">@ SGI15_IRQn</div><div class="ttdoc">Software Generated Interrupt 15.</div><div class="ttdef"><b>Definition:</b> Ref_IRQCtrl.txt:97</div></div>
177 </div><!-- fragment --><h1><a class="anchor" id="core_config_sect"></a>
178 Configuration of the Processor and Core Peripherals</h1>
179 <p>The <a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</a> configures the Cortex-A processor and the core peripherals with <em>#defines</em> that are set prior to including the file <b>core_&lt;cpu&gt;.h</b>.</p>
180 <p>The following tables list the <em>#defines</em> along with the possible values for each processor core. If these <em>#defines</em> are missing default values are used.</p>
181 <table class="cmtable">
182 <tr>
183 <th>#define </th><th>Value Range </th><th>Default </th><th>Description  </th></tr>
184 <tr>
185 <td>__CM0_REV </td><td>0x0000 </td><td>0x0000 </td><td>Core revision number ([15:8] revision number, [7:0] patch number)  </td></tr>
186 <tr>
187 <td>__CORTEX_A </td><td>5, 7, 9 </td><td>(n/a) </td><td>Core type number  </td></tr>
188 <tr>
189 <td>__FPU_PRESENT </td><td>0 .. 1 </td><td>0 </td><td>Defines if an FPU is present or not  </td></tr>
190 <tr>
191 <td>__GIC_PRESENT </td><td>0 ..1  </td><td>Defines if an GIC is present or not </td><td>Core revision number ([15:8] revision number, [7:0] patch number)  </td></tr>
192 <tr>
193 <td>__TIM_PRESENT </td><td>0 .. 1 </td><td>0 </td><td>Defines if a private timer is present or not  </td></tr>
194 <tr>
195 <td>__L2C_PRESENT </td><td>0 .. 1 </td><td>0 </td><td>Defines if a level 2 cache controller is present or not  </td></tr>
196 </table>
197 <p><b>Example</b></p>
198 <p>The following code exemplifies the configuration of the Cortex-A9 Processor and Core Peripherals.</p>
199 <div class="fragment"><div class="line"><span class="preprocessor">#define __CA_REV        0x0000U    </span></div>
200 <div class="line"><span class="preprocessor">#define __CORTEX_A           9U    </span></div>
201 <div class="line"><span class="preprocessor">#define __FPU_PRESENT        1U    </span></div>
202 <div class="line"><span class="preprocessor">#define __GIC_PRESENT        1U    </span></div>
203 <div class="line"><span class="preprocessor">#define __TIM_PRESENT        0U    </span></div>
204 <div class="line"><span class="preprocessor">#define __L2C_PRESENT        0U    </span></div>
205 <div class="line">:</div>
206 <div class="line">:</div>
207 <div class="line"><span class="preprocessor">#include &quot;<a class="code" href="core__ca_8h.html">core_ca.h</a>&quot;</span>               <span class="comment">/* Cortex-A processor and core peripherals       */</span></div>
208 <div class="ttc" id="acore__ca_8h_html"><div class="ttname"><a href="core__ca_8h.html">core_ca.h</a></div></div>
209 </div><!-- fragment --><h1><a class="anchor" id="core_version_sect"></a>
210 CMSIS Version and Processor Information</h1>
211 <p>Defines in the core_<em>cpu</em>.h file identify the version of the CMSIS-Core-A and the processor used. The following shows the defines in the various core_<em>cpu</em>.h files that may be used in the <a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</a> to verify a minimum version or ensure that the right processor core is used.</p>
212 <div class="fragment"><div class="line"><span class="preprocessor">#define __CA_CMSIS_VERSION_MAIN  (5U)                                 </span><span class="comment">/* [31:16] CMSIS Core main version */</span><span class="preprocessor"></span></div>
213 <div class="line"><span class="preprocessor">#define __CA_CMSIS_VERSION_SUB   (0U)                                 </span><span class="comment">/* [15:0]  CMSIS Core sub version */</span><span class="preprocessor"></span></div>
214 <div class="line"><span class="preprocessor">#define __CA_CMSIS_VERSION       ((__CA_CMSIS_VERSION_MAIN &lt;&lt; 16U) | \</span></div>
215 <div class="line"><span class="preprocessor">                                   __CA_CMSIS_VERSION_SUB          )  </span><span class="comment">/* CMSIS Core version number */</span><span class="preprocessor"></span></div>
216 </div><!-- fragment --><h1><a class="anchor" id="device_access"></a>
217 Device Peripheral Access Layer</h1>
218 <p>The <a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</a> contains for each peripheral:</p><ul>
219 <li>Register Layout Typedef</li>
220 <li>Base Address</li>
221 <li>Access Definitions</li>
222 </ul>
223 <p>The section <a class="el" href="group__peripheral__gr.html">Peripheral Access</a> shows examples for peripheral definitions.</p>
224 <h1><a class="anchor" id="device_h_sec"></a>
225 Device.h Template File</h1>
226 <p>The silicon vendor needs to extend the Device.h template file with the CMSIS features described above. In addition the <a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</a> may contain functions to access device-specific peripherals. The <a class="el" href="system_c_pg.html#system_Device_h_sec">system_Device.h Template File</a> which is provided as part of the CMSIS specification is shown below.</p>
227 <pre class="fragment">/**************************************************************************//**
228  * @file     &lt;Device&gt;.h
229  * @brief    CMSIS-Core(A) Device Header File for Device &lt;Device&gt;
230  *
231  * @version  V1.0.1
232  * @date     18. July 2023
233  ******************************************************************************/
234 /*
235  * Copyright (c) 2009-2023 Arm Limited. All rights reserved.
236  *
237  * SPDX-License-Identifier: Apache-2.0
238  *
239  * Licensed under the Apache License, Version 2.0 (the License); you may
240  * not use this file except in compliance with the License.
241  * You may obtain a copy of the License at
242  *
243  * www.apache.org/licenses/LICENSE-2.0
244  *
245  * Unless required by applicable law or agreed to in writing, software
246  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
247  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
248  * See the License for the specific language governing permissions and
249  * limitations under the License.
250  */
251
252 #ifndef &lt;Device&gt;_H      /* ToDo: replace '&lt;Device&gt;' with your device name */
253 #define &lt;Device&gt;_H
254
255 #ifdef __cplusplus
256 extern "C" {
257 #endif
258
259
260 /* ========================================================================= */
261 /* ============           Interrupt Number Definition           ============ */
262 /* ========================================================================= */
263
264 typedef enum IRQn
265 {
266 /* ================     Cortex-A Specific Interrupt Numbers  =============== */
267
268   /* Software Generated Interrupts */
269   SGI0_IRQn                          =  0,  /* Software Generated Interrupt  0 */
270   SGI1_IRQn                          =  1,  /* Software Generated Interrupt  1 */
271   SGI2_IRQn                          =  2,  /* Software Generated Interrupt  2 */
272   SGI3_IRQn                          =  3,  /* Software Generated Interrupt  3 */
273   SGI4_IRQn                          =  4,  /* Software Generated Interrupt  4 */
274   SGI5_IRQn                          =  5,  /* Software Generated Interrupt  5 */
275   SGI6_IRQn                          =  6,  /* Software Generated Interrupt  6 */
276   SGI7_IRQn                          =  7,  /* Software Generated Interrupt  7 */
277   SGI8_IRQn                          =  8,  /* Software Generated Interrupt  8 */
278   SGI9_IRQn                          =  9,  /* Software Generated Interrupt  9 */
279   SGI10_IRQn                         = 10,  /* Software Generated Interrupt 10 */
280   SGI11_IRQn                         = 11,  /* Software Generated Interrupt 11 */
281   SGI12_IRQn                         = 12,  /* Software Generated Interrupt 12 */
282   SGI13_IRQn                         = 13,  /* Software Generated Interrupt 13 */
283   SGI14_IRQn                         = 14,  /* Software Generated Interrupt 14 */
284   SGI15_IRQn                         = 15,  /* Software Generated Interrupt 15 */
285
286   /* Private Peripheral Interrupts */
287   VirtualMaintenanceInterrupt_IRQn   = 25,  /* Virtual Maintenance Interrupt */
288   HypervisorTimer_IRQn               = 26,  /* Hypervisor Timer Interrupt */
289   VirtualTimer_IRQn                  = 27,  /* Virtual Timer Interrupt */
290   Legacy_nFIQ_IRQn                   = 28,  /* Legacy nFIQ Interrupt */
291   SecurePhyTimer_IRQn                = 29,  /* Secure Physical Timer Interrupt */
292   NonSecurePhyTimer_IRQn             = 30,  /* Non-Secure Physical Timer Interrupt */
293   Legacy_nIRQ_IRQn                   = 31,  /* Legacy nIRQ Interrupt */
294
295  /* Shared Peripheral Interrupts */
296  /* ToDo: add here your device specific external interrupt numbers */
297   &lt;DeviceInterrupt&gt;_IRQn             =  0,  /* Device Interrupt                                                          */
298 } IRQn_Type;
299
300
301 /* ========================================================================= */
302 /* ============      Processor and Core Peripheral Section      ============ */
303 /* ========================================================================= */
304
305 /* ================ Start of section using anonymous unions ================ */
306 #if   defined (__CC_ARM)
307   #pragma push
308   #pragma anon_unions
309 #elif defined (__ICCARM__)
310   #pragma language=extended
311 #elif defined(__ARMCC_VERSION) &amp;&amp; (__ARMCC_VERSION &gt;= 6010050)
312   #pragma clang diagnostic push
313   #pragma clang diagnostic ignored "-Wc11-extensions"
314   #pragma clang diagnostic ignored "-Wreserved-id-macro"
315 #elif defined (__GNUC__)
316   /* anonymous unions are enabled by default */
317 #elif defined (__TMS470__)
318   /* anonymous unions are enabled by default */
319 #elif defined (__TASKING__)
320   #pragma warning 586
321 #elif defined (__CSMC__)
322   /* anonymous unions are enabled by default */
323 #else
324   #warning Not supported compiler type
325 #endif
326
327
328 /* --------  Configuration of Core Peripherals  ----------------------------------- */
329 /* ToDo: set the defines according your Device */
330 /* ToDo: define the correct core revision
331          5U if your device is a CORTEX-A5 device
332          7U if your device is a CORTEX-A7 device
333          9U if your device is a CORTEX-A9 device */
334 #define __CORTEX_A                    #U      /* Cortex-A# Core */
335 #define __CA_REV                 0x0000U      /* Core revision r0p0 */
336 /* ToDo: define the correct core features for the &lt;Device&gt; */
337 #define __FPU_PRESENT           1U       /* Set to 1 if FPU is present */
338 #define __GIC_PRESENT           1U       /* Set to 1 if GIC is present */
339 #define __TIM_PRESENT           1U       /* Set to 1 if TIM is present */
340 #define __L2C_PRESENT           1U       /* Set to 1 if L2C is present */
341
342 /* ToDo: include the correct core_ca#.h file
343          core_ca5.h if your device is a CORTEX-A5 device
344          core_ca7.h if your device is a CORTEX-A7 device
345          core_ca9.h if your device is a CORTEX-A9 device */
346 #include &lt;core_ca#.h&gt;                           /* Processor and core peripherals */
347 /* ToDo: include your system_&lt;Device&gt;.h file
348          replace '&lt;Device&gt;' with your device name */
349 #include "system_&lt;Device&gt;.h"                    /* System Header */
350
351
352
353 /* ========================================================================= */
354 /* ============       Device Specific Peripheral Section        ============ */
355 /* ========================================================================= */
356
357
358 /* ToDo: add here your device specific peripheral access structure typedefs
359          following is an example for a timer */
360
361 /* ========================================================================= */
362 /* ============                       TMR                       ============ */
363 /* ========================================================================= */
364
365 typedef struct
366 {
367   __IOM uint32_t  TimerLoad;                 /* Offset: 0x004 (R/W) Load Register */
368   __IM  uint32_t  TimerValue;                /* Offset: 0x008 (R/ ) Counter Current Value Register */
369   __IOM uint32_t  TimerControl;              /* Offset: 0x00C (R/W) Control Register */
370   __OM  uint32_t  TimerIntClr;               /* Offset: 0x010 ( /W) Interrupt Clear Register */
371   __IM  uint32_t  TimerRIS;                  /* Offset: 0x014 (R/ ) Raw Interrupt Status Register */
372   __IM  uint32_t  TimerMIS;                  /* Offset: 0x018 (R/ ) Masked Interrupt Status Register */
373   __IM  uint32_t  RESERVED[1];
374   __IOM uint32_t  TimerBGLoad;               /* Offset: 0x020 (R/W) Background Load Register */
375 } &lt;DeviceAbbreviation&gt;_TMR_TypeDef;
376
377
378
379 /* --------  End of section using anonymous unions and disabling warnings  -------- */
380 #if   defined (__CC_ARM)
381   #pragma pop
382 #elif defined (__ICCARM__)
383   /* leave anonymous unions enabled */
384 #elif (defined(__ARMCC_VERSION) &amp;&amp; (__ARMCC_VERSION &gt;= 6010050))
385   #pragma clang diagnostic pop
386 #elif defined (__GNUC__)
387   /* anonymous unions are enabled by default */
388 #elif defined (__TMS470__)
389   /* anonymous unions are enabled by default */
390 #elif defined (__TASKING__)
391   #pragma warning restore
392 #elif defined (__CSMC__)
393   /* anonymous unions are enabled by default */
394 #else
395   #warning Not supported compiler type
396 #endif
397
398
399 /* ========================================================================= */
400 /* ============     Device Specific Peripheral Address Map      ============ */
401 /* ========================================================================= */
402
403
404 /* ToDo: add here your device peripherals base addresses
405          following is an example for timer */
406
407 /* Peripheral and SRAM base address */
408 #define &lt;DeviceAbbreviation&gt;_FLASH_BASE       (0x00000000UL)                              /* (FLASH     ) Base Address */
409 #define &lt;DeviceAbbreviation&gt;_SRAM_BASE        (0x20000000UL)                              /* (SRAM      ) Base Address */
410 #define &lt;DeviceAbbreviation&gt;_PERIPH_BASE      (0x40000000UL)                              /* (Peripheral) Base Address */
411
412 /* Peripheral memory map */
413 #define &lt;DeviceAbbreviation&gt;TIM0_BASE         (&lt;DeviceAbbreviation&gt;_PERIPH_BASE)          /* (Timer0    ) Base Address */
414 #define &lt;DeviceAbbreviation&gt;TIM1_BASE         (&lt;DeviceAbbreviation&gt;_PERIPH_BASE + 0x0800) /* (Timer1    ) Base Address */
415 #define &lt;DeviceAbbreviation&gt;TIM2_BASE         (&lt;DeviceAbbreviation&gt;_PERIPH_BASE + 0x1000) /* (Timer2    ) Base Address */
416
417
418 /* ========================================================================= */
419 /* ============             Peripheral declaration              ============ */
420 /* ========================================================================= */
421
422
423 /* ToDo: Add here your device peripherals pointer definitions
424          following is an example for timer */
425
426 #define &lt;DeviceAbbreviation&gt;_TIM0        ((&lt;DeviceAbbreviation&gt;_TMR_TypeDef *) &lt;DeviceAbbreviation&gt;TIM0_BASE)
427 #define &lt;DeviceAbbreviation&gt;_TIM1        ((&lt;DeviceAbbreviation&gt;_TMR_TypeDef *) &lt;DeviceAbbreviation&gt;TIM0_BASE)
428 #define &lt;DeviceAbbreviation&gt;_TIM2        ((&lt;DeviceAbbreviation&gt;_TMR_TypeDef *) &lt;DeviceAbbreviation&gt;TIM0_BASE)
429
430 #ifdef __cplusplus
431 }
432 #endif
433
434 #endif  /* &lt;Device&gt;_H */
435 </pre> </div></div><!-- contents -->
436 </div><!-- PageDoc -->
437 </div><!-- doc-content -->
438 <!-- start footer part -->
439 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
440   <ul>
441     <li class="footer">
442       <script type="text/javascript">
443         <!--
444         writeFooter.call(this);
445         //-->
446       </script> 
447     </li>
448   </ul>
449 </div>
450 </body>
451 </html>