Kinetis SDK v.1.3 API Reference Manual
Rev. 0
Freescale Semiconductor, Inc.
|
This section describes the programming interface of the LMEM Cache HAL driver.
Files | |
file | fsl_lmem_cache_hal.h |
Macros | |
#define | LMEM_CACHE_LINE_SIZE 0x10 |
LMEM CACHE Line Size in bytes. More... | |
Enumerations | |
enum | lmem_cache_status_t { , kStatus_LMEM_CACHE_Busy, kStatus_LMEM_CACHE_DemoteError, kStatus_LMEM_CACHE_Error } |
Error codes for the LMEM CACHE driver. More... | |
enum | lmem_cache_mode_t { kCacheNonCacheable = 0x0U, kCacheWriteThrough = 0x2U, kCacheWriteBack = 0x3U } |
LMEM CACHE mode options. More... | |
enum | lmem_cache_region_t { kCacheRegion0 = 0U, kCacheRegion1 = 1U, kCacheRegion2 = 2U, kCacheRegion3 = 3U, kCacheRegion4 = 4U, kCacheRegion5 = 5U, kCacheRegion6 = 6U, kCacheRegion7 = 7U, kCacheRegion8 = 8U, kCacheRegion9 = 9U, kCacheRegion10 = 10U, kCacheRegion11 = 11U, kCacheRegion12 = 12U, kCacheRegion13 = 13U, kCacheRegion14 = 14U, kCacheRegion15 = 15U } |
LMEM CACHE Regions. More... | |
enum | lmem_cache_line_command_t { kCacheLineSearchReadOrWrite = 0U, kCacheLineInvalidate = 1U, kCacheLinePush = 2U, kCacheLineClear = 3U } |
LMEM CACHE line command. More... | |
Processor Code Bus Cache Control | |
static void | LMEM_HAL_SetCodeCacheEnableCmd (LMEM_Type *base, bool enable) |
Enables or disables the Processor Code bus cache and write buffer. More... | |
void | LMEM_HAL_SetCodeCacheInvalidateAllCmd (LMEM_Type *base, bool enable) |
Enable or disable the Processor Code bus option to invalidate all lines. More... | |
void | LMEM_HAL_SetCodeCachePushAllCmd (LMEM_Type *base, bool enable) |
Enable or disable the Processor Code bus option to push all modified lines. More... | |
void | LMEM_HAL_SetCodeCacheClearAllCmd (LMEM_Type *base, bool enable) |
Enable or disable the Processor Code bus option to push and invalidate all modified lines. More... | |
static void | LMEM_HAL_InitiateCodeCacheCommand (LMEM_Type *base) |
Initiate the Processor Code bus cache command. More... | |
static bool | LMEM_HAL_IsCodeCacheCommandActive (LMEM_Type *base) |
Returns whether or not the Processor Code bus cache command is in progress. More... | |
static void | LMEM_HAL_InitiateCodeCacheLineCommand (LMEM_Type *base) |
Initiate the Processor Code bus cache line command. More... | |
static bool | LMEM_HAL_IsCodeCacheLineCommandActive (LMEM_Type *base) |
Returns whether or not the Processor Code bus cache line command is in progress. More... | |
static void | LMEM_HAL_SetCodeCacheLineCommand (LMEM_Type *base, lmem_cache_line_command_t command) |
Sets the cache line command for the Processor Code bus. More... | |
static void | LMEM_HAL_SetCodeCachePhysicalAddr (LMEM_Type *base, uint32_t addr) |
Sets the physical address for cache line commands for the Processor Code bus. More... | |
void | LMEM_HAL_SetCodeCacheRegionMode (LMEM_Type *base, lmem_cache_region_t region, lmem_cache_mode_t cacheMode) |
Sets the cache mode for a specific region for the Processor Code bus. More... | |
uint32_t | LMEM_HAL_GetCodeCacheRegionMode (LMEM_Type *base, lmem_cache_region_t region) |
Gets the current cache mode for a specific region for the Processor Code bus. More... | |
#define LMEM_CACHE_LINE_SIZE 0x10 |
Cache line is 32 bytes (or 4-words)
enum lmem_cache_status_t |
enum lmem_cache_mode_t |
enum lmem_cache_region_t |
|
inlinestatic |
This function enables or disables the Processor Code bus cache and write buffer.
base | Module base pointer of type LMEM_Type. |
enable | Enable (true) or disable (false) the Processor Code bus cache and write buffer |
void LMEM_HAL_SetCodeCacheInvalidateAllCmd | ( | LMEM_Type * | base, |
bool | enable | ||
) |
This function enables or disables the Processor Code bus option to invalidate all lines in both WAYs.
base | Module base pointer of type LMEM_Type. |
enable | Enable (true) or disable (false) the Processor Code bus option to invalidate all lines |
void LMEM_HAL_SetCodeCachePushAllCmd | ( | LMEM_Type * | base, |
bool | enable | ||
) |
This function enables or disables the Processor Code bus option to push all modified lines to both WAYs.
base | Module base pointer of type LMEM_Type. |
enable | Enable (true) or disable (false) the Processor Code bus option to push all modified lines |
void LMEM_HAL_SetCodeCacheClearAllCmd | ( | LMEM_Type * | base, |
bool | enable | ||
) |
This function enables or disables the Processor Code bus option to push and invalidate all modified lines.
base | Module base pointer of type LMEM_Type. |
enable | Enable (true) or disable (false) the Processor Code bus option to push all modified lines |
|
inlinestatic |
This function initiates the Processor Code bus cache command to execute an invalidate command and/or push command.
base | Module base pointer of type LMEM_Type. |
|
inlinestatic |
This function returns the state of the Processor Code bus cache command. The command is either active (in progress) or idle.
base | Module base pointer of type LMEM_Type. |
|
inlinestatic |
This function initiates the Processor Code bus cache line command to execute a search and read or write command, an invalidate command, a push command, or a clear command.
base | Module base pointer of type LMEM_Type. |
|
inlinestatic |
This function returns the state of the Processor Code bus cache line command. The command is either active (in progress) or idle.
base | Module base pointer of type LMEM_Type. |
|
inlinestatic |
This function sets the cache line command for the Processor Code bus. The command can be search and read or write, invalidate, push, or clear.
base | Module base pointer of type LMEM_Type. |
command | The cache line command of type lmem_cache_line_command_t |
|
inlinestatic |
This function sets the physical address for cache line commands for the Processor Code bus. The commands are specified in the CLCR[LADSEL] bits.
base | Module base pointer of type LMEM_Type. |
addr | The physical address for cache line commands |
void LMEM_HAL_SetCodeCacheRegionMode | ( | LMEM_Type * | base, |
lmem_cache_region_t | region, | ||
lmem_cache_mode_t | cacheMode | ||
) |
This function sets the cache mode for a specific region for the Processor Code bus. Note that you can only demote the cache mode.
base | Module base pointer of type LMEM_Type. |
region | The region to demote the cache mode of type lmem_cache_region_t |
cacheMode | The specified demoted cache mode of type lmem_cache_mode_t |
uint32_t LMEM_HAL_GetCodeCacheRegionMode | ( | LMEM_Type * | base, |
lmem_cache_region_t | region | ||
) |
This function gets the current cache mode for a specific region for the Processor Code bus.
base | Module base pointer of type LMEM_Type. |
region | The region to obtain the cache mode of type lmem_cache_region_t |