a test code to implement and test LP1768 power control mode

Dependencies:   mbed

This code implemented some LP1768 power mode : Sleep(), DeepSleep(), PowerDown(), DeepPowerDown(), BOGD_PowerDown(). It also has a test code to test these power modes and wakeup using watch dog. The wakeup part is based on Erik's code but add implementation for LP1768. As LP1768 has debug enabled in default, it cannot be waked up in DeepSleep mode. Therefore this code use WDC reset to wake up the chips from deep sleep. The test code also allow test the power under two clock frequency (96 MHz and 48MHz). Inspired by Paul and Michael Wang, I also tested the power reduction by power off PHY. The analysis could be found in http://mbed.org/users/steniu01/notebook/lp1768-power-mode-implementation-and-measurement-/#

ClockControl/ClockControl.h

Committer:
steniu01
Date:
2014-08-02
Revision:
2:15d9501bf5b3

File content as of revision 2:15d9501bf5b3:

/* mbed PowerControl Library
  * Copyright (c) 2010 Michael Wei
  */ 
  
//shouldn't have to include, but fixes weird problems with defines
//#include "LPC1768/LPC17xx.h"
#include "mbed.h"
#ifndef MBED_CLOCKCONTROL_H 
#define MBED_CLOCKCONTROL_H 

unsigned int setSystemFrequency(unsigned char clkDivider, unsigned char clkSrc, unsigned short M, unsigned char N);
void setPLL0Frequency(unsigned char clkSrc, unsigned short M, unsigned char N);
void setPLL1Frequency(unsigned char clkSrc, unsigned short M, unsigned char N);
#endif