CMSIS-Core (Cortex-M)  Version 5.4.0
CMSIS-Core support for Cortex-M processor-based devices
 All Data Structures Files Functions Variables Enumerations Enumerator Groups Pages
D-Cache Functions

Functions for the level-1 data cache. More...

Functions

__STATIC_FORCEINLINE void SCB_EnableDCache (void)
 Enable D-Cache. More...
 
__STATIC_FORCEINLINE void SCB_DisableDCache (void)
 Disable D-Cache. More...
 
__STATIC_FORCEINLINE void SCB_InvalidateDCache (void)
 Invalidate D-Cache. More...
 
__STATIC_FORCEINLINE void SCB_CleanDCache (void)
 Clean D-Cache. More...
 
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
 Clean & Invalidate D-Cache. More...
 
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
 D-Cache Invalidate by address. More...
 
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize)
 D-Cache Clean by address. More...
 
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
 D-Cache Clean and Invalidate by address. More...
 

Description

Functions for the level-1 data cache.

// close ICache functions

Function Documentation

__STATIC_FORCEINLINE void SCB_CleanDCache ( void  )

Clean D-Cache.

The function cleans the entire data cache.

__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr ( uint32_t *  addr,
int32_t  dsize 
)

D-Cache Clean by address.

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

The function cleans a memory block of size dsize [bytes] starting at address address. The address is aligned to 32-byte boundry.

__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache ( void  )

Clean & Invalidate D-Cache.

The function cleans and invalidates the entire data cache.

__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr ( uint32_t *  addr,
int32_t  dsize 
)

D-Cache Clean and Invalidate by address.

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

The function invalidates and cleans a memory block of size dsize [bytes] starting at address address. The address is aligned to 32-byte boundry.

__STATIC_FORCEINLINE void SCB_DisableDCache ( void  )

Disable D-Cache.

The function turns off the entire data cache.

Note
When disabling the data cache, you must clean (SCB_CleanDCache) the entire cache to ensure that any dirty data is flushed to external memory.
__STATIC_FORCEINLINE void SCB_EnableDCache ( void  )

Enable D-Cache.

The function turns on the entire data cache.

Note
Before enabling the data cache, you must invalidate the entire data cache (SCB_InvalidateDCache), because external memory might have changed from when the cache was disabled.
After reset, you must invalidate (SCB_InvalidateDCache) each cache before enabling it.
__STATIC_FORCEINLINE void SCB_InvalidateDCache ( void  )

Invalidate D-Cache.

The function invalidates the entire data cache.

Note
After reset, you must invalidate each cache before enabling (SCB_EnableDCache) it.
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr ( uint32_t *  addr,
int32_t  dsize 
)

D-Cache Invalidate by address.

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

The function invalidates a memory block of size dsize [bytes] starting at address address. The address is aligned to 32-byte boundry.