Microchip® Advanced Software Framework

low_power_board.c File Reference

Board specific code for low power example.

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

#include "board.h"
#include "pio.h"
#include "pio_handler.h"
#include "pmc.h"
#include "adc.h"
#include "low_power_board.h"

Macros

#define IRQ_PRIOR_PIO   0
 IRQ priority for PIO (The lower the value, the greater the priority) More...
 

Functions

void init_specific_board (void)
 Initialize SAM3N_EK 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 IRQ_PRIOR_PIO   0

IRQ priority for PIO (The lower the value, the greater the priority)

Referenced by init_specific_board().

void init_specific_board ( void  )

uint32_t g_fastrc_clock_list[][3]
Initial value:
= {
{125000, CKGR_MOR_MOSCRCF_4_MHz, PMC_MCKR_PRES_CLK_32},
{250000, CKGR_MOR_MOSCRCF_4_MHz, PMC_MCKR_PRES_CLK_16},
{500000, CKGR_MOR_MOSCRCF_4_MHz, PMC_MCKR_PRES_CLK_8},
{1000000, CKGR_MOR_MOSCRCF_4_MHz, PMC_MCKR_PRES_CLK_4},
{2000000, CKGR_MOR_MOSCRCF_4_MHz, PMC_MCKR_PRES_CLK_2},
{4000000, CKGR_MOR_MOSCRCF_4_MHz, PMC_MCKR_PRES_CLK_1},
{8000000, CKGR_MOR_MOSCRCF_8_MHz, PMC_MCKR_PRES_CLK_1},
{12000000, CKGR_MOR_MOSCRCF_12_MHz, PMC_MCKR_PRES_CLK_1}
}

Clock list from fast RC.

Referenced by user_change_clock().

uint32_t g_pll_clock_list[][4]
Initial value:
= {
{24000000, 7, 1, PMC_MCKR_PRES_CLK_4},
{32000000, 7, 1, PMC_MCKR_PRES_CLK_3},
{48000000, 7, 1, PMC_MCKR_PRES_CLK_2},
{64000000, 31, 3, PMC_MCKR_PRES_CLK_2},
{84000000, 13, 1, PMC_MCKR_PRES_CLK_2},
{100000000, 24, 1, PMC_MCKR_PRES_CLK_3},
{120000000, 19, 1, PMC_MCKR_PRES_CLK_2}
}

Clock list from PLL.

Referenced by user_change_clock().