Microchip® Advanced Software Framework

low_power_board.h File Reference

Board specific definition for low power example.

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

Macros

#define CLOCK_LIST_MENU
 
#define EFC   EFC0
 
#define MAX_CLOCK_FAST_RC_ITEM   '8'
 
#define MAX_CLOCK_PLL_ITEM   'g'
 
#define MIN_CLOCK_FAST_RC_ITEM   '1'
 
#define MIN_CLOCK_PLL_ITEM   'a'
 
#define STRING_ACTIVE
 Hint message for active mode. More...
 
#define STRING_BACKUP
 Hint message for backup mode. More...
 
#define STRING_SLEEP
 Hint message for sleep mode. More...
 
#define STRING_WAIT
 Hint message for wait mode. More...
 
#define WAKEUP_BACKUP_INPUT_ID   (1u << 2)
 Wakeup pin for backup mode: WKUP2 pin (SW0) More...
 
#define WAKEUP_WAIT_INPUT_ID   (1u << 2)
 Wakeup pin for wait mode: WKUP2 pin (SW0) More...
 
#define PIN_PUSHBUTTON_WAKEUP_PIO   PIN_PUSHBUTTON_0_PIO
 Push button definitions for sleep mode and active mode. More...
 
#define PIN_PUSHBUTTON_WAKEUP_MASK   PIN_PUSHBUTTON_0_MASK
 
#define PIN_PUSHBUTTON_WAKEUP_ID   PIN_PUSHBUTTON_0_ID
 
#define PIN_PUSHBUTTON_WAKEUP_ATTR   PIN_PUSHBUTTON_0_ATTR
 

Functions

void init_specific_board (void)
 Initialize SAM4 Xplained Pro board for low power test. More...
 

Variables

uint32_t g_fastrc_clock_list [][3]
 Clock list from fast RC. More...
 
uint32_t g_pll_clock_list [][4]
 Clock list from PLL. More...
 

#define CLOCK_LIST_MENU
Value:
"\n\rSelect one of the following clock configurations:\n\r" \
" 1: 125KHz from Fast RC\n\r" \
" 2: 250KHz from Fast RC\n\r" \
" 3: 500KHz from Fast RC\n\r" \
" 4: 1MHz from Fast RC\n\r" \
" 5: 2MHz from Fast RC\n\r" \
" 6: 4MHz from Fast RC\n\r" \
" 7: 8MHz from Fast RC\n\r" \
" 8: 12MHz from Fast RC\n\r" \
" a: 24MHz from PLL clock\n\r" \
" b: 32MHz from PLL clock\n\r" \
" c: 48MHz from PLL clock\n\r" \
" d: 64MHz from PLL clock\n\r" \
" e: 84MHz from PLL clock\n\r" \
" f: 100MHz from PLL clock\n\r" \
" g: 120MHz from PLL clock\n\r" \

Referenced by user_change_clock().

#define EFC   EFC0

Referenced by display_menu_core(), and test_core().

#define MAX_CLOCK_FAST_RC_ITEM   '8'

Referenced by user_change_clock().

#define MAX_CLOCK_PLL_ITEM   'g'

Referenced by user_change_clock().

#define MIN_CLOCK_FAST_RC_ITEM   '1'

Referenced by user_change_clock().

#define MIN_CLOCK_PLL_ITEM   'a'

Referenced by user_change_clock().

#define PIN_PUSHBUTTON_WAKEUP_ATTR   PIN_PUSHBUTTON_0_ATTR

Referenced by configure_button().

#define PIN_PUSHBUTTON_WAKEUP_ID   PIN_PUSHBUTTON_0_ID

Referenced by button_handler(), and configure_button().

#define PIN_PUSHBUTTON_WAKEUP_MASK   PIN_PUSHBUTTON_0_MASK

Referenced by button_handler(), and configure_button().

#define PIN_PUSHBUTTON_WAKEUP_PIO   PIN_PUSHBUTTON_0_PIO

Push button definitions for sleep mode and active mode.

Referenced by configure_button().

#define STRING_ACTIVE
Value:
"Enter into active mode.\n\r" \
"- Press SW0 button to go out.\n\r"

Hint message for active mode.

Referenced by test_active_mode().

#define STRING_BACKUP
Value:
"Enter into backup mode.\n\r" \
"- Press SW0 button to wake up.\n\r"

Hint message for backup mode.

#define STRING_SLEEP
Value:
"Enter into sleep mode.\n\r" \
"- Press SW0 button to wake up.\n\r"

Hint message for sleep mode.

Referenced by test_sleep_mode().

#define STRING_WAIT
Value:
"Enter into wait mode.\n\r" \
"- Switch to 4MHz Fast RC oscillator, PLL stopped.\n\r" \
"- Press SW0 button to wake up.\n\r"

Hint message for wait mode.

Referenced by test_wait_mode().

#define WAKEUP_BACKUP_INPUT_ID   (1u << 2)

Wakeup pin for backup mode: WKUP2 pin (SW0)

#define WAKEUP_WAIT_INPUT_ID   (1u << 2)

Wakeup pin for wait mode: WKUP2 pin (SW0)

void init_specific_board ( void  )

uint32_t g_fastrc_clock_list[][3]

Clock list from fast RC.

Referenced by user_change_clock().

uint32_t g_pll_clock_list[][4]

Clock list from PLL.

Referenced by user_change_clock().