mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-31 17:31:18 +01:00
cpu/lpc2387: export functions to init PLL & MAM
Those functions are needed after wake from lower sleep modes.
This commit is contained in:
parent
80b300289d
commit
3b257f9a5a
@ -43,14 +43,14 @@ static inline void pllfeed(void)
|
||||
* @brief Enabling MAM and setting number of clocks used for Flash memory fetch
|
||||
* @internal
|
||||
*/
|
||||
static inline void init_mam(void)
|
||||
void cpu_init_mam(void)
|
||||
{
|
||||
MAMCR = 0x0000;
|
||||
MAMTIM = 0x0003;
|
||||
MAMCR = 0x0002;
|
||||
}
|
||||
|
||||
static void init_clks1(void)
|
||||
void cpu_init_pll(void)
|
||||
{
|
||||
/* Disconnect PLL */
|
||||
PLLCON &= ~0x0002;
|
||||
@ -88,10 +88,7 @@ static void init_clks1(void)
|
||||
|
||||
/* Set clock divider to 4 (value+1) */
|
||||
CCLKCFG = CL_CPU_DIV - 1; /* Fcpu = 72 MHz */
|
||||
}
|
||||
|
||||
static void init_clks2(void)
|
||||
{
|
||||
/* Wait for the PLL to lock to set frequency */
|
||||
while (!(PLLSTAT & BIT26));
|
||||
|
||||
@ -114,7 +111,6 @@ void cpu_init_clks(void)
|
||||
{
|
||||
watchdog_init();
|
||||
PCONP = PCRTC; /* switch off everything except RTC */
|
||||
init_clks1();
|
||||
init_clks2();
|
||||
init_mam();
|
||||
cpu_init_pll();
|
||||
cpu_init_mam();
|
||||
}
|
||||
|
||||
@ -28,6 +28,16 @@ extern "C" {
|
||||
|
||||
extern uintptr_t __stack_start; /**< end of user stack memory space */
|
||||
|
||||
/**
|
||||
* @brief Initialize the phase lock loop oscillator
|
||||
*/
|
||||
void cpu_init_pll(void);
|
||||
|
||||
/**
|
||||
* @brief Initialize the Memory Acceleration Module
|
||||
*/
|
||||
void cpu_init_mam(void);
|
||||
|
||||
/**
|
||||
* @brief Scale lpc2387 cpu speed
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user