low_level_init.cpp File Reference
#include <stdio.h>
#include "sys_config.h"
#include "LPC17xx.h"
#include "uart0_min.h"
#include "lpc_isr.h"
#include "lpc_sys.h"
#include "core_cm3.h"
#include "fault_registers.h"
#include "FreeRTOS.h"
Include dependency graph for low_level_init.cpp:

Functions

void syscalls_init (void)
 
void sys_clock_configure ()
 
sys_boot_t sys_get_boot_type ()
 
rtc_t sys_get_boot_time ()
 
void low_level_init (void)
 

Function Documentation

void low_level_init ( void  )

Initializes the minimal system including CPU Clock, UART, and Flash accelerator Be careful of the order of the operations!!!

Turn off I/O buffering otherwise sometimes printf/scanf doesn't behave correctly due to strange buffering and/or flushing effects.

void sys_clock_configure ( )

< Not used (reserved)

Disconnect PLL0 (in case bootloader uses PLL0) Choose internal oscillator going forward (for now)

Connect PLL0 as our clock source. Right before we make the PLL clock as CPU clock, set our divider so our CPU clock doesn't go out of range once the faster PLL clock is established.

rtc_t sys_get_boot_time ( )
Returns
the boot-time recorded in the system
sys_boot_t sys_get_boot_type ( )

Defined at system_init.c

Returns
the reboot reason as detected during system startup
void syscalls_init ( void  )