![]() |
Kinetis SDK v.1.3 API Reference Manual
Rev. 0
Freescale Semiconductor, Inc.
|
The section describes the programming interface of the COP HAL driver.
Data Structures | |
| struct | cop_config_t |
| Data structure to initialize the COP. More... | |
Enumerations | |
| enum | cop_clock_source_t { kCopLpoClock, kCopBusClock } |
| COP clock source selection. More... | |
| enum | cop_timeout_cycles_t { kCopTimeout_short_2to5_or_long_2to13 = 1U, kCopTimeout_short_2to8_or_long_2to16 = 2U, kCopTimeout_short_2to10_or_long_2to18 = 3U } |
| Define the value of the COP timeout cycles. More... | |
| enum | cop_status_t { kStatus_COP_Success = 0x0U, kStatus_COP_Fail = 0x01, kStatus_COP_NotInitlialized = 0x2U, kStatus_COP_NullArgument = 0x3U } |
| cop status return codes. More... | |
COP HAL. | |
| void | COP_HAL_SetConfig (SIM_Type *base, const cop_config_t *configPtr) |
| Configures the COP Watchdog. More... | |
| static void | COP_HAL_Enable (void) |
| Enables the COP Watchdog. More... | |
| static void | COP_HAL_Disable (SIM_Type *base) |
| Disables the COP Watchdog. More... | |
| static bool | COP_HAL_IsEnable (SIM_Type *base) |
| Determines whether the COP is enabled. More... | |
| static void | COP_HAL_Refresh (SIM_Type *base) |
| Servicing the COP Watchdog. More... | |
| static void | COP_HAL_ResetSystem (SIM_Type *base) |
| Resets the system. More... | |
| void | COP_HAL_Init (SIM_Type *base) |
| Restores the COP module to the reset value. More... | |
| struct cop_config_t |
This structure is used to initialize the COP during the cop_init function call. It contains all COP configurations.
Data Fields | |
| bool | copWindowModeEnable |
| Set COP watchdog run mode—Window mode or Normal mode. | |
| cop_clock_source_t | copClockSource |
| Set COP watchdog clock source. | |
| cop_timeout_cycles_t | copTimeout |
| Set COP watchdog timeout value. | |
| enum cop_clock_source_t |
| enum cop_timeout_cycles_t |
| enum cop_status_t |
| void COP_HAL_SetConfig | ( | SIM_Type * | base, |
| const cop_config_t * | configPtr | ||
| ) |
The COP control register is write once after reset.
| base | The COP peripheral base address |
| configPtr | configure COP control register |
|
inlinestatic |
After reset the COP is enabled.
|
inlinestatic |
This function disables the COP Watchdog and should be called after reset if your application does not need the COP Watchdog.
| base | The COP peripheral base address |
|
inlinestatic |
This function checks whether the COP is running.
| base | The COP peripheral base address |
| true | COP is enabled |
| false | COP is disabled |
|
inlinestatic |
This function resets the COP timeout by writing 0x55 then 0xAA. Writing any other value generates a system reset. The writing operations should be atomic.
| base | The COP peripheral base address |
|
inlinestatic |
This function resets the system.
| base | The COP peripheral base address |
| void COP_HAL_Init | ( | SIM_Type * | base | ) |
This function restores the COP module to the reset value.
| base | The COP peripheral base address |