3.4 CFD - Clock Failure Detection
3.4.1 Introduction
The MCC Melody Clock Failure Detection (CFD) PLIB Driver (Peripheral Library) generates API to support CFD-specific peripheral functionality on ATmega target MCU's.
The Clock Failure Detection (CFD) feature detects a failed oscillator or clock source by checking for edges on the selected oscillator/clock. If no edges are detected within a specific time, a CFD condition is issued and triggers an interrupt or forces the device to switch to a stable internal clock source.
3.4.2 Supported Device Families
ATmega32xx |
3.4.3 Required header files:
#include "mcc_generated_files/system/cfd.h"
3.4.4 Module Documentation
3.4.4.1 CFD
This file contains the API prototypes for the Clock Failure Detection (CFD) driver.
3.4.4.1.1 Module description
This file contains the API prototypes for the Clock Failure Detection (CFD) driver.
Functions
int8_t CFD_Initialize (void)
Initializes the CFD module.
bool CFD_GetInterruptFlagStatus (void)
Checks the Interrupt flag status of the CFD module.
void CFD_EnableInterrupt (void)
Enables the clock failure detection interrupt of the CFD module.
void CFD_DisableInterrupt (void)
Disables the clock failure detection interrupt of the CFD module.
3.4.4.1.2 Function Documentation
CFD_DisableInterrupt()
void CFD_DisableInterrupt (void )
Disables the clock failure detection interrupt of the CFD module.
|
None. |
CFD_EnableInterrupt()
void CFD_EnableInterrupt (void )
Enables the clock failure detection interrupt of the CFD module.
|
None. |
CFD_GetInterruptFlagStatus()
bool CFD_GetInterruptFlagStatus (void )
Checks the Interrupt flag status of the CFD module.
|
|
CFD_Initialize()
int8_t CFD_Initialize (void )
Initializes the CFD module.
|
|
3.4.5 File Documentation
3.4.5.1 source/cfd.c File Reference
This file contains the API implementation for the CFD module driver.
#include <avr/io.h> #include "../cfd.h"
3.4.5.1.1 Functions
int8_t CFD_Initialize (void)
Initializes the CFD module.
bool CFD_GetInterruptFlagStatus (void)
Checks the Interrupt flag status of the CFD module.
void CFD_EnableInterrupt (void)
Enables the clock failure detection interrupt of the CFD module.
void CFD_DisableInterrupt (void)
Disables the clock failure detection interrupt of the CFD module.
3.4.5.1.2 Detailed Description
This file contains the API implementation for the CFD module driver.
CFD Generated Driver File
3.4.5.2 source/cfd.h File Reference
#include "../system/utils/compiler.h" #include <stdint.h> #include <stdbool.h>
3.4.5.2.1 Functions
int8_t CFD_Initialize (void)
Initializes the CFD module.
bool CFD_GetInterruptFlagStatus (void)
Checks the Interrupt flag status of the CFD module.
void CFD_EnableInterrupt (void)
Enables the clock failure detection interrupt of the CFD module.
void CFD_DisableInterrupt (void)
Disables the clock failure detection interrupt of the CFD module.
3.4.5.2.2 Detailed Description
CFD Generated Driver API Header File