#include <types.h>
#include <lpc21xx.h>
#include <string.h>
+#include <pll.h>
#include <periph/can.h>
#include <periph/uart_zen.h>
#include <pwm.h>
#define SUB_VERSION 6
/*! @} */
-/*!\def PCLK
-* Peripheral clock frequency in Hz.
+/*! @defgroup CLK Clock settings
+* @ingroup defines
+* These constants define the crystal frequency, core clock and peripheral clock.
+* @{
*/
+#define OSC_FREQ 10000000
+#define CCLK 60000000
#define PCLK 60000000
+/*! @} */
/*!\def TRUE
* Formal definition of logical "TRUE" value.
can_msg_t reset_msg = {.id = DAM_RESET_ID, .dlc = 2, .data = {MAIN_VERSION, SUB_VERSION}}; // GPS CAN data packet
- PLLCFG = 0x25;
- PLLCON = 0x03; // set the core clock to 60MHz
- PLLFEED = 0xAA;
- PLLFEED = 0x55;
+ sys_pll_init ( CCLK, OSC_FREQ ); // set the core clock to 60MHz
VPBDIV = 0x01; // peripheral clock = CPU clock (60MHz)