]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Core/src/core_cm7.txt
CMSIS-Core documentation added TX_context.h and minor enhancments/corrections
[cmsis] / CMSIS / DoxyGen / Core / src / core_cm7.txt
1 /**
2 \defgroup cache_functions_m7 Cache Functions  (only Cortex-M7)
3 \brief Functions for Instruction and Data Cache.
4 \details 
5 Cortex-M7 processors include a memory system, which includes an optional MPU and Harvard data and instruction
6 cache with ECC.  The optional CPU cache has an instruction and data cache with sizes of \token{[0;4;8;16;32;64]KB}.
7 Both instruction and data cache RAM can be configured at implementation time to have Error
8 Correcting Code (ECC) to protect the data stored in the memory from errors.
9
10 All cache maintenance operations are executed by writing to registers in the memory mapped
11 System Control Space (SCS) region of the internal PPB memory space. 
12
13 \note 
14 After reset, you must invalidate each cache before enabling it. 
15  
16 The functions are grouped for:
17  - \ref Icache_functions_m7
18  - \ref Dcache_functions_m7
19
20 @{
21 */
22
23 /**
24   \defgroup Icache_functions_m7 I-Cache Functions
25   \brief Functions for the instruction cache.
26   @{
27 */
28  
29
30
31 /**
32   \brief Enable I-Cache.
33   
34   The function turns on the instruction cache.
35 \note
36 Before enabling the instruction cache, you must invalidate (\ref SCB_InvalidateICache) the entire instruction cache if
37 external memory might have changed since the cache was disabled.
38 \note 
39 After reset, you must invalidate (\ref SCB_InvalidateICache) each cache before enabling it. 
40 */
41 __STATIC_INLINE void SCB_EnableICache (void);
42
43
44 /**
45   \brief Disable I-Cache.
46   
47   The function turns off the instruction cache.
48
49 */
50 __STATIC_INLINE void SCB_DisableICache (void);
51
52
53 /**
54   \brief Invalidate I-Cache.
55   
56   The function invalidates the instruction cache.
57   The instruction cache is never dirty so cache RAM errors are always recoverable by invalidating the cache and retrying the instruction.
58 \note 
59 After reset, you must invalidate each cache before enabling (\ref SCB_EnableICache) it. 
60
61 */
62 __STATIC_INLINE void SCB_InvalidateICache (void);
63
64
65 /**
66   @}  // close ICache functions
67 */
68  
69 /**
70   \defgroup Dcache_functions_m7 D-Cache Functions  
71   \brief Functions for the data cache.
72
73   @{
74 */
75
76 /**
77   \brief Enable D-Cache.
78   
79   The function turns on the entire data cache.
80 \note 
81 Before enabling the data cache, you must invalidate the entire data cache (\ref SCB_InvalidateDCache), because external
82 memory might have changed from when the cache was disabled.
83
84 \note 
85 After reset, you must invalidate (\ref SCB_InvalidateDCache) each cache before enabling it. 
86 */
87 __STATIC_INLINE void SCB_EnableDCache (void);
88
89
90 /** 
91   \brief Disable D-Cache.
92   
93   The function turns off the entire data cache.
94   
95 \note
96 When disabling the data cache, you must clean (\ref SCB_CleanDCache) the entire cache to ensure that any dirty data is
97 flushed to external memory.
98
99 */
100 __STATIC_INLINE void SCB_DisableDCache (void);
101
102
103 /**
104   \brief Invalidate D-Cache.
105
106   The function invalidates the entire data cache.
107
108 \note
109 After reset, you must invalidate each cache before enabling (\ref SCB_EnableDCache) it. 
110
111 */
112 __STATIC_INLINE void SCB_InvalidateDCache (void);
113
114
115 /** 
116   \brief Clean D-Cache.
117
118   The function cleans the entire data cache.
119 */
120 __STATIC_INLINE void SCB_CleanDCache (void);
121
122
123 /** 
124   \brief Clean & Invalidate D-Cache.
125  
126   The function cleans and invalidates the entire data cache.
127 */
128 __STATIC_INLINE void SCB_CleanInvalidateDCache (void);
129
130
131 /**
132   \brief       D-Cache Invalidate by address
133   \param[in]   addr    address (aligned to 32-byte boundary)
134   \param[in]   dsize   size of memory block (in number of bytes)
135   
136   The function invalidates a memory block of size \em dsize [bytes] starting at address \em address. The address is aligned to 32-byte boundry.
137 */
138 __STATIC_INLINE void SCB_InvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize);
139
140
141 /**
142   \brief       D-Cache Clean by address
143   \param[in]   addr    address (aligned to 32-byte boundary)
144   \param[in]   dsize   size of memory block (in number of bytes)
145   
146   The function cleans a memory block of size \em dsize [bytes] starting at address \em address. The address is aligned to 32-byte boundry.
147
148
149 */
150 __STATIC_INLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize);
151
152
153 /**
154   \brief       D-Cache Clean and Invalidate by address
155   \param[in]   addr    address (aligned to 32-byte boundary)
156   \param[in]   dsize   size of memory block (in number of bytes)
157   
158   The function invalidates and cleans a memory block of size \em dsize [bytes] starting at address \em address. The address is aligned to 32-byte boundry.
159 */
160 __STATIC_INLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize);
161
162 /**
163 @}  // close D-Cache Functions
164 @}
165 */