]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Core_A/src/core_ca.txt
Updated Core_A documentation
[cmsis] / CMSIS / DoxyGen / Core_A / src / core_ca.txt
1 /**************************************************************************//**
2  * @file     core_ca.txt
3  * @brief    CMSIS Cortex-A Core Peripheral Access Layer Header File
4  ******************************************************************************/
5
6 /* IO definitions (access restrictions to peripheral registers) */
7 /**
8 \defgroup   peripheral_gr    Peripheral Access
9 \brief      Naming conventions and optional features for accessing peripherals.
10 \details
11 The section below describes the naming conventions, requirements, and optional features for accessing device specific peripherals.
12 Most of the rules also apply to the core peripherals.  The \ref device_h_pg "Device Header File \<device.h>" contains typically these definition and also includes
13 the core specific header files.
14
15 The definitions for \ref peripheral_gr can be generated using the <a href="../../SVD/html/index.html"><b>CMSIS-SVD</b></a> System View Description for Peripherals.
16 Refer to <a href="../../SVD/html/svd_SVDConv_pg.html"><b>SVDConv.exe</b></a> for more information.
17         
18 Each peripheral provides a data type definition with a name that is composed of:
19   - an optional prefix <b>&lt;<i>device abbreviation&gt;</i>_</b>
20   - <b>&lt;<i>peripheral name</i>&gt;</b>
21   - postfix \b _Type or \b _TypeDef to identify a type definition.
22
23 Examples:
24   - \b UART_TypeDef for the peripheral \b UART.
25   - \b LPC_UART_TypeDef for the device family \b LPC and the peripheral \b UART.
26
27 The data type definition uses standard C data types defined by the ANSI C header file <stdint.h>.
28  
29  - IO Type Qualifiers are used to specify the access to peripheral variables.
30    IO Type Qualifier  | Type            | Description
31    :------------------|:----------------|:------------
32    \b __IM            | Struct member   | Defines 'read only' permissions
33    \b __OM            | Struct member   | Defines 'write only' permissions
34    \b __IOM           | Struct member   | Defines 'read / write' permissions
35    \b __I             | Scalar variable | Defines 'read only' permissions
36    \b __O             | Scalar variable | Defines 'write only' permissions
37    \b __IO            | Scalar variable | Defines 'read / write' permissions
38    
39 The typedef <b>\<<i>device abbreviation</i>\>_UART_TypeDef</b> shown below defines the generic register layout for all UART channels in a device.
40
41 \code
42 typedef struct
43 {
44   union {
45   __IM  uint8_t  RBR;                 // Offset: 0x000 (R/ )  Receiver Buffer Register          
46   __OM  uint8_t  THR;                 // Offset: 0x000 ( /W)  Transmit Holding Register           
47   __IOM uint8_t  DLL;                 // Offset: 0x000 (R/W)  Divisor Latch LSB                   
48         uint32_t RESERVED0;
49   };
50   union {
51   __IOM uint8_t  DLM;                 // Offset: 0x004 (R/W)  Divisor Latch MSB                   
52   __IOM uint32_t IER;                 // Offset: 0x004 (R/W)  Interrupt Enable Register           
53   };
54   union {
55   __IM  uint32_t IIR;                 // Offset: 0x008 (R/ )  Interrupt ID Register               
56   __OM  uint8_t  FCR;                 // Offset: 0x008 ( /W)  FIFO Control Register               
57   };
58   __IOM uint8_t  LCR;                 // Offset: 0x00C (R/W)  Line Control Register               
59         uint8_t  RESERVED1[7];
60   __IM  uint8_t  LSR;                 // Offset: 0x014 (R/ )  Line Status Register                
61         uint8_t  RESERVED2[7];
62   __IOM uint8_t  SCR;                 // Offset: 0x01C (R/W)  Scratch Pad Register                
63         uint8_t  RESERVED3[3];
64   __IOM uint32_t ACR;                 // Offset: 0x020 (R/W)  Autobaud Control Register           
65   __IOM uint8_t  ICR;                 // Offset: 0x024 (R/W)  IrDA Control Register               
66         uint8_t  RESERVED4[3];
67   __IOM uint8_t  FDR;                 // Offset: 0x028 (R/W)  Fractional Divider Register         
68         uint8_t  RESERVED5[7];
69   __IOM uint8_t  TER;                 // Offset: 0x030 (R/W)  Transmit Enable Register            
70         uint8_t  RESERVED6[39];
71   __IM  uint8_t  FIFOLVL;             // Offset: 0x058 (R/ )  FIFO Level Register                 
72 } LPC_UART_TypeDef;
73 \endcode
74
75 To access the registers of the UART defined above, pointers to this register structure are defined.
76 If more instances of a peripheral exist, the variables have a postfix (digit or letter) that identifies the peripheral.
77
78 \b Example:
79 In this example, \b LPC_UART2 and \b LPC_UART3 are two pointers to UARTs defined with above register structure.
80 \n
81 \code
82 #define LPC_UART2             ((LPC_UART_TypeDef      *) LPC_UART2_BASE    )
83 #define LPC_UART3             ((LPC_UART_TypeDef      *) LPC_UART3_BASE    )
84 \endcode
85
86 \note 
87  - The prefix <b>LPC</b> is optional.
88  
89 The registers in the various UARTs can now be referred in the user code as shown below:\n
90 \code
91  val = LPC_UART2->DR   // is the data register of UART1.
92 \endcode
93
94 <hr>
95
96 \section core_cmsis_pal_min_reqs Minimal Requirements
97 \details
98  To access the peripheral registers and related function in a device, the files <b><i>device.h</i></b> and <b>core_ca<i>#</i>.h</b> define as a minimum:
99 \n\n
100 - The <b>Register Layout Typedef</b> for each peripheral that defines all register names.
101   RESERVED is used to introduce space into the structure for adjusting the addresses of
102   the peripheral registers.
103 \n\n
104 <b>Example:</b>
105 \code
106 typedef struct
107 {
108   __IOM uint32_t CTRL;                // Offset: 0x000 (R/W)  SysTick Control and Status Register 
109   __IOM uint32_t LOAD;                // Offset: 0x004 (R/W)  SysTick Reload Value Register       
110   __IOM uint32_t VAL;                 // Offset: 0x008 (R/W)  SysTick Current Value Register      
111   __IM  uint32_t CALIB;               // Offset: 0x00C (R/ )  SysTick Calibration Register        
112 } SysTick_Type;
113     \endcode
114
115
116 - <b>Base Address</b> for each peripheral (in case of multiple peripherals
117     that use the same <b>register layout typedef</b> multiple base addresses are defined).
118     \n\n
119 <b>Example:</b>
120 \code
121 #define SysTick_BASE (SCS_BASE + 0x0010)            // SysTick Base Address     
122 \endcode
123
124
125 - <b>Access Definitions</b> for each peripheral. In case of multiple peripherals that are using the same
126     <b>register layout typdef</b>, multiple access definitions exist (LPC_UART0, LPC_UART2).
127     \n\n
128 <b>Example:</b>
129 \code
130 #define SysTick ((SysTick_Type *) Systick_BASE)    // SysTick access definition 
131 \endcode
132
133
134 These definitions allow accessing peripheral registers with simple assignments.
135
136 - <b>Example:</b>
137   \n
138 \code
139 SysTick->CTRL = 0;
140 \endcode
141
142 <hr>
143
144 \section core_cmsis_pal_opts Optional Features
145 \details
146 Optionally, the file <b><i>device</i>.h</b> may define:
147
148 -  \ref core_cmsis_pal_bitfields and \#define constants that simplify access to peripheral registers.
149         These constants may define bit-positions or other specific patterns that are required for
150     programming peripheral registers. The identifiers should start with
151     <b>&lt;<i>device abbreviation</i>&gt;_</b> and <b>&lt;<i>peripheral name</i>&gt;_</b>.
152     It is recommended to use CAPITAL letters for \#define constants.
153
154 -   More complex functions (i.e. status query before
155     a sending register is accessed). Again, these functions start with
156     <b>&lt;<i>device abbreviation</i>&gt;_</b> and <b>&lt;<i>peripheral name</i>&gt;_</b>.
157
158 <hr>
159
160 \section core_cmsis_pal_bitfields Register Bit Fields
161 \details
162
163 For Core Register, macros define the position and the mask value for a bit field. It is recommended to create such definitions also
164 for other peripheral registers.
165
166 <b>Example:</b>
167
168 Bit field definitions for register CPUID in SCB (System Control Block).
169
170
171 \code
172 // SCB CPUID Register Definitions 
173 #define SCB_CPUID_IMPLEMENTER_Pos      24U                                       
174 #define SCB_CPUID_IMPLEMENTER_Msk      (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)     
175                                                                                  
176 #define SCB_CPUID_VARIANT_Pos          20U                                       
177 #define SCB_CPUID_VARIANT_Msk          (0xFUL << SCB_CPUID_VARIANT_Pos)          
178                                                                                  
179 #define SCB_CPUID_ARCHITECTURE_Pos     16U                                       
180 #define SCB_CPUID_ARCHITECTURE_Msk     (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)     
181                                                                                  
182 #define SCB_CPUID_PARTNO_Pos            4U                                       
183 #define SCB_CPUID_PARTNO_Msk           (0xFFFUL << SCB_CPUID_PARTNO_Pos)         
184                                                                                  
185 #define SCB_CPUID_REVISION_Pos          0U                                       
186 #define SCB_CPUID_REVISION_Msk         (0xFUL)     
187 \endcode
188
189 The macros <b>_VAL2FLD(field, value)</b> and <b>_FLD2VAL(field, value)</b> enable access to bit fields.
190 @{
191 */
192
193 /**
194
195 \def   __I
196 \def   __O
197 \def   __IO  
198
199 \def   __IM  
200 \def   __OM  
201 \def   __IOM 
202 */
203 /** @} */ 
204 /*end of group peripheral_gr */
205
206
207 /*******************************************************************************
208  *                 CMSIS definitions
209  ******************************************************************************/
210 /**
211 \defgroup CMSIS_glob_defs CMSIS Global Defines
212 \brief Definitions common to all interfaces 
213     <b>IO Type Qualifiers</b> are used
214     \li to specify the access to peripheral variables.
215     \li for automatic generation of peripheral register debug information.
216 @{
217 */
218
219 /*  CMSIS CA definitions */
220 /**
221 \def __CA_CMSIS_VERSION_MAIN  
222 \def __CA_CMSIS_VERSION_SUB   
223 \def __CA_CMSIS_VERSION       
224                                 
225 \def __FPU_PRESENT
226
227 \def __FPU_USED
228    __FPU_USED indicates whether an FPU is used or not. For this, \ref __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
229
230 \def __CA_REV
231 \def __MPU_PRESENT             
232 */
233 /** @} */ 
234 /*end of group CMSIS_glob_defs */
235
236
237
238 /**
239 \defgroup core_reg_gr Core Register Defines
240 \ingroup core_reg_func_gr
241 \brief Type definitions and defines for Cortex-A processor based devices.
242 @{
243  */
244
245 /* Core Register CPSR */
246 /**
247 \defgroup CMSIS_CPSR Core Register CPSR
248 \brief Type definitions and defines for CPSR
249 @{
250 */
251
252 /**
253 \struct CPSR_Type
254
255 // CPSR Register Definitions 
256 \def CPSR_N_Pos                  
257 \def CPSR_Z_Pos                  
258 \def CPSR_C_Pos                  
259 \def CPSR_V_Pos                  
260 \def CPSR_Q_Pos                  
261 \def CPSR_IT0_Pos                
262 \def CPSR_J_Pos                  
263 \def CPSR_GE_Pos                 
264 \def CPSR_IT1_Pos                
265 \def CPSR_E_Pos                  
266 \def CPSR_A_Pos                  
267 \def CPSR_I_Pos                  
268 \def CPSR_F_Pos                  
269 \def CPSR_T_Pos                  
270 \def CPSR_M_Pos                  
271 */
272 /** @} */
273 /* end group CMSIS_CPSR */
274
275
276 /* CP15 Register SCTLR */
277 /**
278 \defgroup CMSIS_SCTLR Core Register SCTLR
279 \brief Type definitions and defines for SCTLR
280 @{
281 */
282 /**
283 \struct SCTLR_Type
284
285 \def SCTLR_TE_Pos                  
286 \def SCTLR_AFE_Pos                 
287 \def SCTLR_TRE_Pos                 
288 \def SCTLR_NMFI_Pos                
289 \def SCTLR_EE_Pos                  
290 \def SCTLR_VE_Pos                  
291 \def SCTLR_U_Pos                   
292 \def SCTLR_FI_Pos                  
293 \def SCTLR_UWXN_Pos                
294 \def SCTLR_WXN_Pos                 
295 \def SCTLR_HA_Pos                  
296 \def SCTLR_RR_Pos                  
297 \def SCTLR_V_Pos                   
298 \def SCTLR_I_Pos                   
299 \def SCTLR_Z_Pos                   
300 \def SCTLR_SW_Pos                  
301 \def SCTLR_B_Pos                   
302 \def SCTLR_CP15BEN_Pos             
303 \def SCTLR_C_Pos                   
304 \def SCTLR_A_Pos                   
305 \def SCTLR_M_Pos                   
306 */
307 /** @} */
308 /* end group CMSIS_SCTLR */
309
310 /* CP15 Register CPACR */
311 /**
312 \defgroup CMSIS_CPACR Core Register CPACR
313 \brief Type definitions and defines for CPACR
314 @{
315 */
316 /**
317 \struct CPACR_Type
318
319 \def CPACR_ASEDIS_Pos         
320 \def CPACR_D32DIS_Pos         
321 \def CPACR_cp11_Pos           
322 \def CPACR_cp10_Pos           
323 */
324 /** @} */
325 /* end group CMSIS_CPACR */
326
327 /* CP15 Register DFSR */
328 /**
329 \defgroup CMSIS_DFSR Core Register DFSR
330 \brief Type definitions and defines for DFSR
331 @{
332 */
333 /**
334 \struct DFSR_Type
335
336 \def DFSR_CM_Pos             
337 \def DFSR_Ext_Pos            
338 \def DFSR_WnR_Pos            
339 \def DFSR_FS1_Pos            
340 \def DFSR_Domain_Pos         
341 \def DFSR_FS0_Pos            
342 */
343 /** @} */
344 /* end group CMSIS_DFSR */
345
346 /* CP15 Register IFSR */
347 /**
348 \defgroup CMSIS_IFSR Core Register IFSR
349 \brief Type definitions and defines for IFSR
350 @{
351 */
352 /**
353 \struct IFSR_Type
354
355 \def IFSR_ExT_Pos           
356 \def IFSR_FS1_Pos           
357 \def IFSR_FS0_Pos           
358 */
359 /** @} */
360 /* end group CMSIS_IFSR */
361
362 /* CP15 Register ISR */
363 /**
364 \defgroup CMSIS_ISR Core Register ISR
365 \brief Type definitions and defines for ISR
366 @{
367 */
368 /**
369 \struct ISR_Type
370
371 \def ISR_A_Pos             
372 \def ISR_I_Pos             
373 \def ISR_F_Pos             
374 */
375 /** @} */
376 /* end group CMSIS_ISR */
377
378 /** @} */ 
379 /* end of group CMSIS_core_register */
380
381 /*
382 \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference
383 \brief 
384 \details
385 Hardware Abstraction Layer.
386    The Core-A function interface contains:
387    - \ref L1_chache_functions 
388    - \ref L2_chache_functions 
389    - \ref PL1_timer_functions
390    - \ref GIC_functions
391    - \ref MMU_functions
392
393 @{
394 */
395
396
397 /* ##########################  L1 Cache functions  ################################# */
398
399 /** 
400 \defgroup L1_chache_functions L1 Cache Functions 
401 @{
402 \fn __STATIC_INLINE void L1C_EnableCaches(void) 
403 \fn __STATIC_INLINE void L1C_DisableCaches(void) 
404 \fn __STATIC_INLINE void L1C_EnableBTAC(void) 
405 \fn __STATIC_INLINE void L1C_DisableBTAC(void) 
406 \fn __STATIC_INLINE void L1C_InvalidateBTAC(void) 
407 \fn __STATIC_INLINE void L1C_InvalidateICacheAll(void)
408 \fn __STATIC_INLINE void L1C_CleanDCacheMVA(void *va) 
409 \fn __STATIC_INLINE void L1C_InvalidateDCacheMVA(void *va) 
410 \fn __STATIC_INLINE void L1C_CleanInvalidateDCacheMVA(void *va) 
411 \fn __STATIC_INLINE void L1C_CleanInvalidateCache(uint32_t op) 
412 \fn __STATIC_INLINE void L1C_InvalidateDCacheAll(void) 
413 \fn __STATIC_INLINE void L1C_CleanDCacheAll(void) 
414 \fn __STATIC_INLINE void L1C_CleanInvalidateDCacheAll(void) 
415 \fn __STATIC_ASM void __L1C_CleanInvalidateCache(uint32_t op) 
416 @}
417 */
418
419 /* ##########################  L2 Cache functions  ################################# */
420
421 //Cache Sync operation
422 /**
423 \defgroup L2_chache_functions L2C-310 Cache Controller Functions 
424 @{
425 \struct L2C_310_TypeDef
426 \def L2C_310
427 \fn __STATIC_INLINE void L2C_Sync(void) 
428 \fn __STATIC_INLINE int L2C_GetID (void) 
429 \fn __STATIC_INLINE int L2C_GetType (void) 
430 \fn __STATIC_INLINE void L2C_InvAllByWay (void) 
431 \fn __STATIC_INLINE void L2C_CleanInvAllByWay (void) 
432 \fn __STATIC_INLINE void L2C_Enable(void) 
433 \fn __STATIC_INLINE void L2C_Disable(void) 
434 \fn __STATIC_INLINE void L2C_InvPa (void *pa) 
435 \fn __STATIC_INLINE void L2C_CleanPa (void *pa) 
436 \fn __STATIC_INLINE void L2C_CleanInvPa (void *pa) 
437 @}
438 */
439
440 /* ##########################  GIC functions  ###################################### */
441 /**
442 \defgroup GIC_functions GIC functions
443 @{
444 \struct  GICDistributor_Type
445 \def GICDistributor
446 \struct  GICInterface_Type
447 \def GICInterface
448 \fn __STATIC_INLINE void GIC_EnableDistributor(void)
449 \fn __STATIC_INLINE void GIC_DisableDistributor(void)
450 \fn __STATIC_INLINE uint32_t GIC_DistributorInfo(void)
451 \fn __STATIC_INLINE uint32_t GIC_DistributorImplementer(void)
452 \fn __STATIC_INLINE void GIC_SetTarget(IRQn_Type IRQn, uint32_t cpu_target)
453 \fn __STATIC_INLINE void GIC_SetICDICFR (const uint32_t *ICDICFRn)
454 \fn __STATIC_INLINE uint32_t GIC_GetTarget(IRQn_Type IRQn)
455 \fn __STATIC_INLINE void GIC_EnableInterface(void)
456 \fn __STATIC_INLINE void GIC_DisableInterface(void)
457 \fn __STATIC_INLINE IRQn_Type GIC_AcknowledgePending(void)
458 \fn __STATIC_INLINE void GIC_EndInterrupt(IRQn_Type IRQn)
459 \fn __STATIC_INLINE void GIC_EnableIRQ(IRQn_Type IRQn)
460 \fn __STATIC_INLINE void GIC_DisableIRQ(IRQn_Type IRQn)
461 \fn __STATIC_INLINE void GIC_SetPendingIRQ(IRQn_Type IRQn)
462 \fn __STATIC_INLINE void GIC_ClearPendingIRQ(IRQn_Type IRQn)
463 \fn __STATIC_INLINE void GIC_SetLevelModel(IRQn_Type IRQn, int8_t edge_level, int8_t model)
464 \fn __STATIC_INLINE void GIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
465 \fn __STATIC_INLINE uint32_t GIC_GetPriority(IRQn_Type IRQn)
466 \fn __STATIC_INLINE void GIC_InterfacePriorityMask(uint32_t priority)
467 \fn __STATIC_INLINE void GIC_SetBinaryPoint(uint32_t binary_point)
468 \fn __STATIC_INLINE uint32_t GIC_GetBinaryPoint(uint32_t binary_point)
469 \fn __STATIC_INLINE uint32_t GIC_GetIRQStatus(IRQn_Type IRQn)
470 \fn __STATIC_INLINE void GIC_SendSGI(IRQn_Type IRQn, uint32_t target_list, uint32_t filter_list)
471 \fn __STATIC_INLINE void GIC_DistInit(void)
472 \fn __STATIC_INLINE void GIC_CPUInterfaceInit(void)
473 \fn __STATIC_INLINE void GIC_Enable(void)
474 @}
475 */
476
477 /* ##########################  Generic Timer functions  ############################ */
478 /**
479 \defgroup pl1_timer_gr Generic Timer Functions
480 \brief Generic hardware timer functions
481 @{
482 */
483 /* leave the function defs in here */
484 /**
485 \details  
486 The function \b PL1_SetLoadValue sets the reset value of the timer.
487 */
488 __STATIC_INLINE void PL1_SetLoadValue(uint32_t value);
489
490 /**
491 \details 
492 The function \b PL1_GetCurrentValue returns the current timer value.
493 */
494 __STATIC_INLINE uint32_t PL1_GetCurrentValue();
495
496 /**
497 \details 
498 The function \b PL1_SetControl sets timer control values.
499 */
500 __STATIC_INLINE void PL1_SetControl(uint32_t value);
501
502 /** @} */
503 /* end of pl1_timer_gr */
504
505
506 /* ##########################  Private Timer functions  ############################ */
507 /**
508 \defgroup PTM_timer_functions Private Timer Functions
509 \brief Private timer functions
510 @{
511 \struct Timer_Type
512 \def PTIM
513 \fn __STATIC_INLINE void PTIM_SetLoadValue(uint32_t value)
514 \fn __STATIC_INLINE uint32_t PTIM_GetLoadValue()
515 \fn __STATIC_INLINE uint32_t PTIM_GetCurrentValue()
516 \fn __STATIC_INLINE void PTIM_SetControl(uint32_t value)
517 \fn __STATIC_INLINE uint32_t PTIM_GetControl(void)
518 \fn __STATIC_INLINE void PTIM_ClearEventFlag(void)
519 @}
520 */
521
522 /* ##########################  FPU functions  ############################ */
523 /**
524 \defgroup FPU_functions Floating Point Unit Functions
525 \brief FPU functions
526 @{
527 \fn __STATIC_ASM void __FPU_Enable(void) 
528 @}
529 */
530
531 /* ##########################  MMU functions  ###################################### */
532 /**
533 \defgroup MMU_gr MMU Functions
534 \brief Functions and defines that relate to the Memory Management Unit
535 @{
536 */
537
538 /**
539 \defgroup MMU_defs_gr MMU Defines and Structs
540 \brief Defines and structures that relate to the Memory Management Unit
541 @{
542 */
543
544 /**
545 \def SECTION_DESCRIPTOR      
546 \def SECTION_B_SHIFT         
547 \def SECTION_C_SHIFT         
548 \def SECTION_TEX0_SHIFT      
549 \def SECTION_TEX1_SHIFT      
550 \def SECTION_TEX2_SHIFT      
551 \def SECTION_XN_SHIFT        
552 \def SECTION_DOMAIN_SHIFT    
553 \def SECTION_P_SHIFT         
554 \def SECTION_AP_SHIFT        
555 \def SECTION_AP2_SHIFT       
556 \def SECTION_S_SHIFT         
557 \def SECTION_NG_SHIFT        
558 \def SECTION_NS_SHIFT        
559 \def PAGE_L1_DESCRIPTOR      
560 \def PAGE_L2_4K_DESC         
561 \def PAGE_L2_64K_DESC        
562 \def PAGE_4K_B_SHIFT         
563 \def PAGE_4K_C_SHIFT         
564 \def PAGE_4K_TEX0_SHIFT      
565 \def PAGE_4K_TEX1_SHIFT      
566 \def PAGE_4K_TEX2_SHIFT      
567 \def PAGE_64K_B_SHIFT        
568 \def PAGE_64K_C_SHIFT        
569 \def PAGE_64K_TEX0_SHIFT     
570 \def PAGE_64K_TEX1_SHIFT     
571 \def PAGE_64K_TEX2_SHIFT     
572 \def PAGE_B_SHIFT            
573 \def PAGE_C_SHIFT            
574 \def PAGE_TEX_SHIFT          
575 \def PAGE_XN_4K_SHIFT        
576 \def PAGE_XN_64K_SHIFT       
577 \def PAGE_DOMAIN_SHIFT       
578 \def PAGE_P_SHIFT            
579 \def PAGE_AP_SHIFT           
580 \def PAGE_AP2_SHIFT          
581 \def PAGE_S_SHIFT            
582 \def PAGE_NG_SHIFT           
583 \def PAGE_NS_SHIFT           
584 \def OFFSET_1M               
585 \def OFFSET_64K              
586 \def OFFSET_4K               
587 \def DESCRIPTOR_FAULT             
588
589 \enum mmu_region_size_Type
590 \enum mmu_memory_Type
591 \enum mmu_cacheability_Type
592 \enum mmu_ecc_check_Type
593 \enum mmu_execute_Type
594 \enum mmu_global_Type
595 \enum mmu_shared_Type
596 \enum mmu_secure_Type
597 \enum mmu_access_Type
598
599 \struct  mmu_region_attributes_Type
600
601 \def section_normal(descriptor_l1, region) 
602 \def section_normal_cod(descriptor_l1, region)
603 \def section_normal_ro(descriptor_l1, region)
604 \def section_normal_rw(descriptor_l1, region)
605 \def section_so(descriptor_l1, region)
606 \def section_device_ro(descriptor_l1, region)
607 \def section_device_rw(descriptor_l1, region)
608 \def page4k_device_rw(descriptor_l1, descriptor_l2, region)
609 \def page64k_device_rw(descriptor_l1, descriptor_l2, region) 
610 */
611 /** @} */
612 /* end group MMU_defs_gr */
613
614 /* start grouping functions */
615 /*
616 @{
617 */
618
619 /**
620 \fn __STATIC_INLINE int MMU_XNSection(uint32_t *descriptor_l1, mmu_execute_Type xn)
621 \details 
622   The function sets section execution-never attribute
623
624 \fn __STATIC_INLINE int MMU_DomainSection(uint32_t *descriptor_l1, uint8_t domain)
625 \details 
626 The function sets section domain.
627
628 \fn __STATIC_INLINE int MMU_PSection(uint32_t *descriptor_l1, mmu_ecc_check_Type p_bit)
629 \details
630   The function sets section parity check
631
632 \fn __STATIC_INLINE int MMU_APSection(uint32_t *descriptor_l1, mmu_access_Type user, mmu_access_Type priv, uint32_t afe)
633 \details 
634 The function sets section access privileges
635
636 \fn __STATIC_INLINE int MMU_SharedSection(uint32_t *descriptor_l1, mmu_shared_Type s_bit)
637 \details
638   The function sets section shareability
639
640 \fn __STATIC_INLINE int MMU_GlobalSection(uint32_t *descriptor_l1, mmu_global_Type g_bit)
641 \details
642   The function sets section Global attribute
643
644 \fn __STATIC_INLINE int MMU_SecureSection(uint32_t *descriptor_l1, mmu_secure_Type s_bit)
645 \details
646   The function sets section Global attribute
647
648 \fn __STATIC_INLINE int MMU_XNPage(uint32_t *descriptor_l2, mmu_execute_Type xn, mmu_region_size_Type page)
649 \details
650   The function sets 4k/64k page execution-never attribute
651
652 \fn __STATIC_INLINE int MMU_DomainPage(uint32_t *descriptor_l1, uint8_t domain)
653 \details
654   The function sets 4k/64k page domain
655
656 \fn __STATIC_INLINE int MMU_PPage(uint32_t *descriptor_l1, mmu_ecc_check_Type p_bit)
657 \details
658   The function sets 4k/64k page parity check
659
660 \fn __STATIC_INLINE int MMU_APPage(uint32_t *descriptor_l2, mmu_access_Type user, mmu_access_Type priv, uint32_t afe)
661 \details
662   The function sets 4k/64k page access privileges
663 \fn __STATIC_INLINE int MMU_SharedPage(uint32_t *descriptor_l2, mmu_shared_Type s_bit)
664 \details
665   The function sets 4k/64k page shareability
666
667 \fn __STATIC_INLINE int MMU_GlobalPage(uint32_t *descriptor_l2, mmu_global_Type g_bit)
668 \details
669   The function sets 4k/64k page Global attribute
670
671 \fn __STATIC_INLINE int MMU_SecurePage(uint32_t *descriptor_l1, mmu_secure_Type s_bit)
672 \details
673   The function sets 4k/64k page Global attribute
674
675 \fn __STATIC_INLINE int MMU_MemorySection(uint32_t *descriptor_l1, mmu_memory_Type mem, mmu_cacheability_Type outer, mmu_cacheability_Type inner)
676 \details
677   The function sets section memory attributes
678
679 \fn __STATIC_INLINE int MMU_MemoryPage(uint32_t *descriptor_l2, mmu_memory_Type mem, mmu_cacheability_Type outer, mmu_cacheability_Type inner, mmu_region_size_Type page)
680 \details
681   The function sets 4k/64k page memory attributes
682
683 \fn __STATIC_INLINE int MMU_GetSectionDescriptor(uint32_t *descriptor, mmu_region_attributes_Type reg)
684 \details
685   The function creates a section descriptor.
686
687 \fn __STATIC_INLINE int MMU_GetPageDescriptor(uint32_t *descriptor, uint32_t *descriptor2, mmu_region_attributes_Type reg)
688 \details
689   The function creates a 4k/64k page descriptor.
690   Assumptions:
691   - TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor
692   - Functions always return 0
693
694 \fn __STATIC_INLINE void MMU_TTSection(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1)
695 \fn __STATIC_INLINE void MMU_TTPage4k(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1, uint32_t *ttb_l2, uint32_t descriptor_l2 )
696 \fn __STATIC_INLINE void MMU_TTPage64k(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1, uint32_t *ttb_l2, uint32_t descriptor_l2 )
697 \fn __STATIC_INLINE void MMU_Enable(void) 
698 \details 
699    Set M bit 0 to enable the MMU
700    Set AFE bit to enable simplified access permissions model
701    Clear TRE bit to disable TEX remap and A bit to disable strict alignment fault checking
702
703 \fn __STATIC_INLINE void MMU_Disable(void)
704
705 \fn __STATIC_INLINE void MMU_InvalidateTLB(void) 
706 */
707
708 /* @} */
709 /* end of MMU_func_gr */
710
711 /** @} */
712 /* end of MMU_gr */
713
714 /*
715 @}
716 */
717 /* end of CMSIS_Core_FunctionInterface  -   currently disabled */