Microchip® Advanced Software Framework

pmc_clock_failure_detect_example.c File Reference

PMC Clock Failure Detection Example.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include "conf_example.h"

Macros

#define CONSOLE_UART_BAUDRATE   (115200)
 Console UART baud rate: 115200 bps. More...
 
#define STRING_EOL   "\r"
 
#define STRING_HEADER
 

Functions

static void configure_console (void)
 Configure the Console UART. More...
 
int main (void)
 pmc_clock_failure_detect_example Application entry point. More...
 
void PMC_Handler (void)
 Handler for PMC interrupt. More...
 

#define CONSOLE_UART_BAUDRATE   (115200)

Console UART baud rate: 115200 bps.

#define STRING_EOL   "\r"
#define STRING_HEADER
Value:
"-- PMC Clock Failure Detection Example --\r\n" \
"-- "BOARD_NAME " --\r\n" \
"-- Compiled: "__DATE__ " "__TIME__ " --"STRING_EOL
#define BOARD_NAME
Definition: inc/app_init.h:140
#define STRING_EOL
Definition: pmc_clock_failure_detect_example.c:71

Referenced by main().

static void configure_console ( void  )
static
int main ( void  )

pmc_clock_failure_detect_example Application entry point.

Enable Clock Failure Detection function in PMC, turn on a LED to indicate that a clock failure is detected.

Returns
Unused (ANSI-C compatibility).

References board_init(), configure_console(), pmc_enable_clock_failure_detector(), pmc_enable_interrupt(), STRING_HEADER, and sysclk_init().

void PMC_Handler ( void  )

Handler for PMC interrupt.

Toggle LED to indicate the event.

References pmc_get_status().