MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
CDOG

Overview

Files

file  fsl_cdog.h
 

Driver version

#define FSL_CDOG_DRIVER_VERSION   (MAKE_VERSION(2, 1, 1))
 Defines CDOG driver version 2.1.1. More...
 

CDOG Functional Operation

status_t CDOG_Init (CDOG_Type *base, cdog_config_t *conf)
 Initialize CDOG. More...
 
void CDOG_Deinit (CDOG_Type *base)
 Deinitialize CDOG. More...
 
void CDOG_GetDefaultConfig (cdog_config_t *conf)
 Sets the default configuration of CDOG. More...
 
void CDOG_Stop (CDOG_Type *base, uint32_t stop)
 Stops secure counter and instruction timer. More...
 
void CDOG_Start (CDOG_Type *base, uint32_t reload, uint32_t start)
 Sets secure counter and instruction timer values. More...
 
void CDOG_Check (CDOG_Type *base, uint32_t check)
 Checks secure counter. More...
 
void CDOG_Set (CDOG_Type *base, uint32_t stop, uint32_t reload, uint32_t start)
 Sets secure counter and instruction timer values. More...
 
void CDOG_Add (CDOG_Type *base, uint32_t add)
 Add value to secure counter. More...
 
void CDOG_Add1 (CDOG_Type *base)
 Add 1 to secure counter. More...
 
void CDOG_Add16 (CDOG_Type *base)
 Add 16 to secure counter. More...
 
void CDOG_Add256 (CDOG_Type *base)
 Add 256 to secure counter. More...
 
void CDOG_Sub (CDOG_Type *base, uint32_t sub)
 brief Substract value to secure counter More...
 
void CDOG_Sub1 (CDOG_Type *base)
 Substract 1 from secure counter. More...
 
void CDOG_Sub16 (CDOG_Type *base)
 Substract 16 from secure counter. More...
 
void CDOG_Sub256 (CDOG_Type *base)
 Substract 256 from secure counter. More...
 
void CDOG_WritePersistent (CDOG_Type *base, uint32_t value)
 Set the CDOG persistent word. More...
 
uint32_t CDOG_ReadPersistent (CDOG_Type *base)
 Get the CDOG persistent word. More...
 

Macro Definition Documentation

#define FSL_CDOG_DRIVER_VERSION   (MAKE_VERSION(2, 1, 1))

Change log:

  • Version 2.1.1
    • Remove bit CONTROL[CONTROL_CTRL]
  • Version 2.1.0
    • Rename CWT to CDOG
  • Version 2.0.2
    • Fix MISRA-2012 issues
  • Version 2.0.1
    • Fix doxygen issues
  • Version 2.0.0
    • initial version

Function Documentation

status_t CDOG_Init ( CDOG_Type *  base,
cdog_config_t *  conf 
)

This function initializes CDOG block and setting.

Parameters
baseCDOG peripheral base address
confCDOG configuration structure
Returns
Status of the init operation
void CDOG_Deinit ( CDOG_Type *  base)

This function deinitializes CDOG secure counter.

Parameters
baseCDOG peripheral base address
void CDOG_GetDefaultConfig ( cdog_config_t *  conf)

This function initialize CDOG config structure to default values.

Parameters
confCDOG configuration structure
void CDOG_Stop ( CDOG_Type *  base,
uint32_t  stop 
)

This function stops instruction timer and secure counter. This also change state od CDOG to IDLE.

Parameters
baseCDOG peripheral base address
stopexpected value which will be compared with value of secure counter
void CDOG_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

Parameters
baseCDOG peripheral base address
reloadreload value
startstart value
void CDOG_Check ( CDOG_Type *  base,
uint32_t  check 
)

This function compares stop value in handler with secure counter value by writting to RELOAD refister.

Parameters
baseCDOG peripheral base address
checkexpected (stop) value
void CDOG_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.

Parameters
baseCDOG peripheral base address
stopexpected value which will be compared with value of secure counter
reloadreload value for instruction timer
startstart value for secure timer
void CDOG_Add ( CDOG_Type *  base,
uint32_t  add 
)

This function add specified value to secure counter.

Parameters
baseCDOG peripheral base address.
addValue to be added.
void CDOG_Add1 ( CDOG_Type *  base)

This function add 1 to secure counter.

Parameters
baseCDOG peripheral base address.
void CDOG_Add16 ( CDOG_Type *  base)

This function add 16 to secure counter.

Parameters
baseCDOG peripheral base address.
void CDOG_Add256 ( CDOG_Type *  base)

This function add 256 to secure counter.

Parameters
baseCDOG peripheral base address.
void CDOG_Sub ( CDOG_Type *  base,
uint32_t  sub 
)

This function substract specified value to secure counter.

param base CDOG peripheral base address. param sub Value to be substracted.

void CDOG_Sub1 ( CDOG_Type *  base)

This function substract specified 1 from secure counter.

Parameters
baseCDOG peripheral base address.
void CDOG_Sub16 ( CDOG_Type *  base)

This function substract specified 16 from secure counter.

Parameters
baseCDOG peripheral base address.
void CDOG_Sub256 ( CDOG_Type *  base)

This function substract specified 256 from secure counter.

Parameters
baseCDOG peripheral base address.
void CDOG_WritePersistent ( CDOG_Type *  base,
uint32_t  value 
)
Parameters
baseCDOG peripheral base address.
valueThe value to be written.
uint32_t CDOG_ReadPersistent ( CDOG_Type *  base)
Parameters
baseCDOG peripheral base address.
Returns
The persistent word.