![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Files | |
file | fsl_cwt.h |
Driver version | |
#define | FSL_CWT_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
Defines CWT driver version 2.0.1. More... | |
CWT Functional Operation | |
status_t | CWT_Init (CDOG_Type *base, cwt_config_t *conf) |
Initialize CWT. More... | |
void | CWT_Deinit (CDOG_Type *base) |
Deinitialize CWT. More... | |
void | CWT_GetDefaultConfig (cwt_config_t *conf) |
Sets the default configuration of CWT. More... | |
void | CWT_Stop (CDOG_Type *base, uint32_t stop) |
Stops secure counter and instruction timer. More... | |
void | CWT_Start (CDOG_Type *base, uint32_t reload, uint32_t start) |
Sets secure counter and instruction timer values. More... | |
void | CWT_Check (CDOG_Type *base, uint32_t check) |
Checks secure counter. More... | |
void | CWT_Set (CDOG_Type *base, uint32_t stop, uint32_t reload, uint32_t start) |
Sets secure counter and instruction timer values. More... | |
void | CWT_Add (CDOG_Type *base, uint32_t add) |
Add value to secure counter. More... | |
void | CWT_Add1 (CDOG_Type *base) |
Add 1 to secure counter. More... | |
void | CWT_Add16 (CDOG_Type *base) |
Add 16 to secure counter. More... | |
void | CWT_Add256 (CDOG_Type *base) |
Add 256 to secure counter. More... | |
void | CWT_Sub (CDOG_Type *base, uint32_t sub) |
brief Substract value to secure counter More... | |
void | CWT_Sub1 (CDOG_Type *base) |
Substract 1 from secure counter. More... | |
void | CWT_Sub16 (CDOG_Type *base) |
Substract 16 from secure counter. More... | |
void | CWT_Sub256 (CDOG_Type *base) |
Substract 256 from secure counter. More... | |
void | CWT_WritePersistent (CDOG_Type *base, uint32_t value) |
Set the CWT persistent word. More... | |
uint32_t | CWT_ReadPersistent (CDOG_Type *base) |
Get the CWT persistent word. More... | |
#define FSL_CWT_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
Change log:
status_t CWT_Init | ( | CDOG_Type * | base, |
cwt_config_t * | conf | ||
) |
This function initializes CWT block and setting.
base | CWT peripheral base address |
conf | CWT configuration structure |
void CWT_Deinit | ( | CDOG_Type * | base | ) |
This function deinitializes CWT secure counter.
base | CWT peripheral base address |
void CWT_GetDefaultConfig | ( | cwt_config_t * | conf | ) |
This function initialize CWT config structure to default values.
conf | CWT configuration structure |
void CWT_Stop | ( | CDOG_Type * | base, |
uint32_t | stop | ||
) |
This function stops instruction timer and secure counter. This also change state od CWT to IDLE.
base | CWT peripheral base address |
stop | expected value which will be compared with value of secure counter |
void CWT_Start | ( | CDOG_Type * | base, |
uint32_t | reload, | ||
uint32_t | start | ||
) |
This function sets value in RELOAD and START registers for instruction timer and secure counter
base | CWT peripheral base address |
reload | reload value |
start | start value |
void CWT_Check | ( | CDOG_Type * | base, |
uint32_t | check | ||
) |
This function compares stop value in handler with secure counter value by writting to RELOAD refister.
base | CWT peripheral base address |
check | expected (stop) value |
void CWT_Set | ( | CDOG_Type * | base, |
uint32_t | stop, | ||
uint32_t | reload, | ||
uint32_t | start | ||
) |
This function sets value in STOP, RELOAD and START registers for instruction timer and secure counter.
base | CWT peripheral base address |
stop | expected value which will be compared with value of secure counter |
reload | reload value for instruction timer |
start | start value for secure timer |
void CWT_Add | ( | CDOG_Type * | base, |
uint32_t | add | ||
) |
This function add specified value to secure counter.
base | CWT peripheral base address. |
add | Value to be added. |
void CWT_Add1 | ( | CDOG_Type * | base | ) |
This function add 1 to secure counter.
base | CWT peripheral base address. |
void CWT_Add16 | ( | CDOG_Type * | base | ) |
This function add 16 to secure counter.
base | CWT peripheral base address. |
void CWT_Add256 | ( | CDOG_Type * | base | ) |
This function add 256 to secure counter.
base | CWT peripheral base address. |
void CWT_Sub | ( | CDOG_Type * | base, |
uint32_t | sub | ||
) |
This function substract specified value to secure counter.
param base CWT peripheral base address. param sub Value to be substracted.
void CWT_Sub1 | ( | CDOG_Type * | base | ) |
This function substract specified 1 from secure counter.
base | CWT peripheral base address. |
void CWT_Sub16 | ( | CDOG_Type * | base | ) |
This function substract specified 16 from secure counter.
base | CWT peripheral base address. |
void CWT_Sub256 | ( | CDOG_Type * | base | ) |
This function substract specified 256 from secure counter.
base | CWT peripheral base address. |
void CWT_WritePersistent | ( | CDOG_Type * | base, |
uint32_t | value | ||
) |
base | CWT peripheral base address. |
value | The value to be written. |
uint32_t CWT_ReadPersistent | ( | CDOG_Type * | base | ) |
base | CWT peripheral base address. |