The MCUXpresso SDK provides a peripheral driver for the Secure Miscellaneous System Control (SMSMC) module of MCUXpresso SDK devices.
The value in security counter register can be setted and changed by APIs provided. Several APIs are provided to control the On-Chip Memory Registers (OCMRn), users can lock the OCMRn, enable and set flash cache mode, select ECC control functions, and some of other APIs are provided to get the ECC fault address and OCMR attribute.
Example use of SMSCM security counter. Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/smscm
|
static void | SMSCM_EnableDebug (SMSCM_Type *base, uint32_t debugToEnable) |
| Enable the Debug function. More...
|
|
static void | SMSCM_DisableDebug (SMSCM_Type *base, uint32_t debugToDisable) |
| Disables the Debug function. More...
|
|
static void | SMSCM_DebugLock (SMSCM_Type *base) |
| Lock the debug function. More...
|
|
static uint32_t | SMSCM_GetSecurityCount (SMSCM_Type *base) |
| Get value in Security Counter Register (SCTR). More...
|
|
static void | SMSCM_SetSecurityCount (SMSCM_Type *base, uint32_t val) |
| Set value in Security Counter Register (SCTR). More...
|
|
static void | SMSCM_IncreaseSecurityCount (SMSCM_Type *base, uint32_t val) |
| Write value to be plused in Security Counter Register (SCTR). More...
|
|
static void | SMSCM_DecreaseSecurityCount (SMSCM_Type *base, uint32_t val) |
| Write value to be minused in Security Counter Register (SCTR). More...
|
|
static void | SMSCM_IncreaseSecurityCountBy1 (SMSCM_Type *base) |
| Increase security counter rigister by 1. More...
|
|
static void | SMSCM_DecreaseSecurityCountBy1 (SMSCM_Type *base) |
| Decrease security counter rigister by 1. More...
|
|
static void | SMSCM_LockMemControlReg (SMSCM_Type *base, smscm_mem_t mem) |
| Lock the on-chip memory descriptor. More...
|
|
static void | SMSCM_EnableFlashCache (SMSCM_Type *base, bool enable) |
| Enable or disable the on-chip memory flash cache. More...
|
|
static void | SMSCM_EnableFlashInstructionCache (SMSCM_Type *base, bool enable) |
| Enable flash instruction cache. More...
|
|
static void | SMSCM_EnableFlashDataCache (SMSCM_Type *base, bool enable) |
| Enable flash data cache. More...
|
|
static void | SMSCM_ClearFlashCache (SMSCM_Type *base) |
| Clear the on-chip memory flash cache. More...
|
|
static void | SMSCM_LockFlashIFR1 (SMSCM_Type *base) |
| Lock IFR1 by flash controller. More...
|
|
static void | SMSCM_EnableFlashSpeculate (SMSCM_Type *base, bool enable) |
| SMSCM Flash Speculate enable. More...
|
|
static void | SMSCM_EnableDataPrefetch (SMSCM_Type *base, bool enable) |
| SMSCM Data Prefetch enable. More...
|
|
static void | SMSCM_EnableFlashDataNonCorrectableBusError (SMSCM_Type *base, bool enable) |
| Disable non-correctable bus errors on flash data fetches. More...
|
|
static void | SMSCM_EnableFlashInstructionNonCorrectableBusError (SMSCM_Type *base, bool enable) |
| Disable non-correctable bus errors on flash instruction fetches. More...
|
|
static void | SMSCM_SetMemEccControl (SMSCM_Type *base, smscm_mem_t mem, smscm_ecc_ctrl_t eccCtrl) |
| Select ecc control type in OCMDRn. More...
|
|
static void | SMSCM_EnableEccReport (SMSCM_Type *base) |
| Enable RAM ECC 1 bit and non-correctable reporting. More...
|
|
static bool | SMSCM_GetEccValid (SMSCM_Type *base) |
| Get the ECC location valid states. More...
|
|
static uint8_t | SMSCM_GetEccLocation (SMSCM_Type *base) |
| Get the ECC location. More...
|
|
void | SMSCM_ClearEccError (SMSCM_Type *base, uint8_t errLocation) |
| Clear each 1-bit correctable or non-correctable error. More...
|
|
static uint32_t | SMSCM_GetEccAddress (SMSCM_Type *base) |
| Get the ECC fault address. More...
|
|
void | SMSCM_GetEccAttribute (SMSCM_Type *base, smscm_ecc_fault_attr_t *eccAttribute) |
| Get ECC attribute. More...
|
|
static uint32_t | SMSCM_GetEccFaultDataHigh (SMSCM_Type *base) |
| Get ECC Fault Data High. More...
|
|
static uint32_t | SMSCM_GetEccFaultDataLow (SMSCM_Type *base) |
| Get ECC Fault Data Low. More...
|
|