2 \defgroup cache_functions_m7 Cache Functions (only Cortex-M7)
3 \brief Functions for Instruction and Data Cache.
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.
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.
14 After reset, you must invalidate each cache before enabling it.
16 The functions are grouped for:
17 - \ref Icache_functions_m7
18 - \ref Dcache_functions_m7
24 \defgroup Icache_functions_m7 I-Cache Functions
25 \brief Functions for the instruction cache.
32 \brief Enable I-Cache.
34 The function turns on the instruction cache.
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.
39 After reset, you must invalidate (\ref SCB_InvalidateICache) each cache before enabling it.
41 __STATIC_INLINE void SCB_EnableICache (void);
45 \brief Disable I-Cache.
47 The function turns off the instruction cache.
50 __STATIC_INLINE void SCB_DisableICache (void);
54 \brief Invalidate I-Cache.
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.
59 After reset, you must invalidate each cache before enabling (\ref SCB_EnableICache) it.
62 __STATIC_INLINE void SCB_InvalidateICache (void);
66 @} // close ICache functions
70 \defgroup Dcache_functions_m7 D-Cache Functions
71 \brief Functions for the data cache.
77 \brief Enable D-Cache.
79 The function turns on the entire data cache.
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.
85 After reset, you must invalidate (\ref SCB_InvalidateDCache) each cache before enabling it.
87 __STATIC_INLINE void SCB_EnableDCache (void);
91 \brief Disable D-Cache.
93 The function turns off the entire data cache.
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.
100 __STATIC_INLINE void SCB_DisableDCache (void);
104 \brief Invalidate D-Cache.
106 The function invalidates the entire data cache.
109 After reset, you must invalidate each cache before enabling (\ref SCB_EnableDCache) it.
112 __STATIC_INLINE void SCB_InvalidateDCache (void);
116 \brief Clean D-Cache.
118 The function cleans the entire data cache.
120 __STATIC_INLINE void SCB_CleanDCache (void);
124 \brief Clean & Invalidate D-Cache.
126 The function cleans and invalidates the entire data cache.
128 __STATIC_INLINE void SCB_CleanInvalidateDCache (void);
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)
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.
138 __STATIC_INLINE void SCB_InvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize);
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)
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.
150 __STATIC_INLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize);
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)
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.
160 __STATIC_INLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize);
163 @} // close D-Cache Functions