The KSDK provides a peripheral driver for the COP module (COP) of Kinetis devices.
Typical use case
Enumerator |
---|
kCOP_LpoClock |
COP clock sourced from LPO.
|
kCOP_BusClock |
COP clock sourced from Bus clock.
|
Enumerator |
---|
kCOP_2Power5CyclesOr2Power13Cycles |
2^5 or 2^13 clock cycles
|
kCOP_2Power8CyclesOr2Power16Cycles |
2^8 or 2^16 clock cycles
|
kCOP_2Power10CyclesOr2Power18Cycles |
2^10 or 2^18 clock cycles
|
This function initializes the COP configuration structure to default values. The default values are:
copConfig->enableWindowMode = false;
copConfig->timeoutMode = kCOP_LongTimeoutMode;
copConfig->enableStop = false;
copConfig->enableDebug = false;
- Parameters
-
config | Pointer to the COP configuration structure. |
- See Also
- cop_config_t
void COP_Init |
( |
SIM_Type * |
base, |
|
|
const cop_config_t * |
config |
|
) |
| |
This function configures the COP. After it is called, the COP starts running according to the configuration. Because all COP control registers are write-once only, the COP_Init function and the COP_Disable function can be called only once. A second call has no effect.
Example:
- Parameters
-
base | SIM peripheral base address. |
config | The configuration of COP. |
static void COP_Disable |
( |
SIM_Type * |
base | ) |
|
|
inlinestatic |
This dedicated function is not provided. Instead, the COP_Disable function can be used to disable the COP.
Disables the COP module.
This function disables the COP Watchdog. Note: The COP configuration register is a write-once after reset. To disable the COP Watchdog, call this function first.
- Parameters
-
base | SIM peripheral base address. |
void COP_Refresh |
( |
SIM_Type * |
base | ) |
|
This function feeds the COP.
- Parameters
-
base | SIM peripheral base address. |