mikroSDK Reference Manual
Cache Functions
Defines and Type Definitions » Status and Control Registers » Nested Vectored Interrupt Controller (NVIC) » System Control Block (SCB) » System Controls not in SCB (SCnSCB) » System Tick Timer (SysTick) » Instrumentation Trace Macrocell (ITM) » Data Watchpoint and Trace (DWT) » Trace Port Interface (TPI) | Defines and Type Definitions » Status and Control Registers » Nested Vectored Interrupt Controller (NVIC) » System Control Block (SCB) » System Controls not in SCB (SCnSCB) » System Tick Timer (SysTick) » Instrumentation Trace Macrocell (ITM) » Data Watchpoint and Trace (DWT) » Trace Port Interface (TPI) » Floating Point Unit (FPU) » Core Debug Registers (CoreDebug) » Core register bit field macros » Core Definitions | Defines and Type Definitions » Status and Control Registers » Nested Vectored Interrupt Controller (NVIC) » System Control Block (SCB) » System Controls not in SCB (SCnSCB) » System Tick Timer (SysTick) » Instrumentation Trace Macrocell (ITM) » Data Watchpoint and Trace (DWT) » Trace Port Interface (TPI) | Defines and Type Definitions » Status and Control Registers » Nested Vectored Interrupt Controller (NVIC) » System Control Block (SCB) » System Controls not in SCB (SCnSCB) » System Tick Timer (SysTick) » Instrumentation Trace Macrocell (ITM) » Data Watchpoint and Trace (DWT) » Trace Port Interface (TPI) » Floating Point Unit (FPU) » Core Debug Registers (CoreDebug) » Core register bit field macros » Core Definitions » Functions and Instructions Reference » NVIC Functions » FPU Functions

Functions that configure Instruction and Data cache. More...

Topics

 SysTick Functions
 Functions that configure the System.
 
__STATIC_FORCEINLINE void SCB_EnableICache (void)
 Enable I-Cache.
 
__STATIC_FORCEINLINE void SCB_DisableICache (void)
 Disable I-Cache.
 
__STATIC_FORCEINLINE void SCB_InvalidateICache (void)
 Invalidate I-Cache.
 
__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (void *addr, int32_t isize)
 I-Cache Invalidate by address.
 
__STATIC_FORCEINLINE void SCB_EnableDCache (void)
 Enable D-Cache.
 
__STATIC_FORCEINLINE void SCB_DisableDCache (void)
 Disable D-Cache.
 
__STATIC_FORCEINLINE void SCB_InvalidateDCache (void)
 Invalidate D-Cache.
 
__STATIC_FORCEINLINE void SCB_CleanDCache (void)
 Clean D-Cache.
 
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
 Clean & Invalidate D-Cache.
 
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (void *addr, int32_t dsize)
 D-Cache Invalidate by address.
 
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize)
 D-Cache Clean by address.
 
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
 D-Cache Clean and Invalidate by address.
 
#define CCSIDR_WAYS(x)   (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos)
 
#define CCSIDR_SETS(x)   (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos )
 
#define __SCB_DCACHE_LINE_SIZE   32U
 
#define __SCB_ICACHE_LINE_SIZE   32U
 

Macro Definition Documentation

◆ __SCB_DCACHE_LINE_SIZE

#define __SCB_DCACHE_LINE_SIZE   32U

Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR

◆ __SCB_ICACHE_LINE_SIZE

#define __SCB_ICACHE_LINE_SIZE   32U

Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR

Function Documentation

◆ SCB_CleanDCache()

__STATIC_FORCEINLINE void SCB_CleanDCache ( void )

Cleans D-Cache

◆ SCB_CleanDCache_by_Addr()

__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr ( uint32_t * addr,
int32_t dsize )

Cleans D-Cache for the given address D-Cache is cleaned starting from a 32 byte aligned address in 32 byte granularity. D-Cache memory blocks which are part of given address + given size are cleaned.

Parameters
[in]addraddress
[in]dsizesize of memory block (in number of bytes)

◆ SCB_CleanInvalidateDCache()

__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache ( void )

Cleans and Invalidates D-Cache

◆ SCB_CleanInvalidateDCache_by_Addr()

__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr ( uint32_t * addr,
int32_t dsize )

Cleans and invalidates D_Cache for the given address D-Cache is cleaned and invalidated starting from a 32 byte aligned address in 32 byte granularity. D-Cache memory blocks which are part of given address + given size are cleaned and invalidated.

Parameters
[in]addraddress (aligned to 32-byte boundary)
[in]dsizesize of memory block (in number of bytes)

◆ SCB_DisableDCache()

__STATIC_FORCEINLINE void SCB_DisableDCache ( void )

Turns off D-Cache

◆ SCB_DisableICache()

__STATIC_FORCEINLINE void SCB_DisableICache ( void )

Turns off I-Cache

◆ SCB_EnableDCache()

__STATIC_FORCEINLINE void SCB_EnableDCache ( void )

Turns on D-Cache

◆ SCB_EnableICache()

__STATIC_FORCEINLINE void SCB_EnableICache ( void )

Turns on I-Cache

◆ SCB_InvalidateDCache()

__STATIC_FORCEINLINE void SCB_InvalidateDCache ( void )

Invalidates D-Cache

◆ SCB_InvalidateDCache_by_Addr()

__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr ( void * addr,
int32_t dsize )

Invalidates D-Cache for the given address. D-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity. D-Cache memory blocks which are part of given address + given size are invalidated.

Parameters
[in]addraddress
[in]dsizesize of memory block (in number of bytes)

◆ SCB_InvalidateICache()

__STATIC_FORCEINLINE void SCB_InvalidateICache ( void )

Invalidates I-Cache

◆ SCB_InvalidateICache_by_Addr()

__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr ( void * addr,
int32_t isize )

Invalidates I-Cache for the given address. I-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity. I-Cache memory blocks which are part of given address + given size are invalidated.

Parameters
[in]addraddress
[in]isizesize of memory block (in number of bytes)