SAM Asynchronous Timer (AST) example 2 alarm wakeup.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
static void | ast_alarm_callback (void) |
Callback handler for AST alarm Interrupt. More... | |
static void | config_ast (void) |
Configure timer. More... | |
static void | config_wakeup (void) |
Configure the wake-up. More... | |
static void | configure_console (void) |
Configure serial console. More... | |
static void | display_menu (void) |
Display the user menu on the terminal. More... | |
int | main (void) |
main function : do init and loop. More... | |
Variables | |
volatile bool | flag = false |
|
static |
Callback handler for AST alarm Interrupt.
References ast_disable_interrupt(), AST_INTERRUPT_ALARM, and flag.
Referenced by config_ast().
|
static |
Configure timer.
References ast_alarm_callback(), ast_clear_interrupt_flag(), AST_COUNTER_MODE, ast_disable_interrupt(), ast_enable(), ast_enable_wakeup(), AST_INTERRUPT_ALARM, AST_OSC_32KHZ, AST_PSEL_32KHZ_1HZ, ast_set_callback(), ast_set_config(), AST_WAKEUP_ALARM, ast_config::counter, ast_config::mode, osc_enable(), OSC_ID_OSC32, osc_is_ready(), ast_config::osc_type, osc_wait_ready(), and ast_config::psel.
Referenced by main().
|
static |
|
static |
Configure serial console.
References uart_rs232_options::baudrate, and stdio_serial_init().
Referenced by main().
|
static |
Display the user menu on the terminal.
Referenced by main().
int main | ( | void | ) |
main function : do init and loop.
References ast_clear_interrupt_flag(), ast_enable_interrupt(), AST_INTERRUPT_ALARM, ast_read_counter_value(), ast_write_alarm0_value(), board_init(), BOARD_NAME, bpm_sleep(), config_ast(), config_wakeup(), configure_console(), delay_ms, display_menu(), flag, and sysclk_init().
Referenced by abdac_callback(), ast_alarm_callback(), ast_per_callback(), main(), run_abdac_interrupt_test(), run_alarm_test(), run_cbc_mode_test(), run_cfb128_mode_test(), run_ctr_mode_test(), run_ecb_mode_test(), run_ecb_mode_test_pdca(), run_iis_test(), run_ofb_mode_test(), and run_periodic_test().