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-/#

Committer:
steniu01
Date:
Sat Aug 02 16:01:23 2014 +0000
Revision:
2:15d9501bf5b3
a test code to test LP1768 power mode.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
steniu01 2:15d9501bf5b3 1 /* mbed PowerControl Library
steniu01 2:15d9501bf5b3 2 * Copyright (c) 2010 Michael Wei
steniu01 2:15d9501bf5b3 3 */
steniu01 2:15d9501bf5b3 4
steniu01 2:15d9501bf5b3 5 //shouldn't have to include, but fixes weird problems with defines
steniu01 2:15d9501bf5b3 6 //#include "LPC1768/LPC17xx.h"
steniu01 2:15d9501bf5b3 7 #include "mbed.h"
steniu01 2:15d9501bf5b3 8 #ifndef MBED_CLOCKCONTROL_H
steniu01 2:15d9501bf5b3 9 #define MBED_CLOCKCONTROL_H
steniu01 2:15d9501bf5b3 10
steniu01 2:15d9501bf5b3 11 unsigned int setSystemFrequency(unsigned char clkDivider, unsigned char clkSrc, unsigned short M, unsigned char N);
steniu01 2:15d9501bf5b3 12 void setPLL0Frequency(unsigned char clkSrc, unsigned short M, unsigned char N);
steniu01 2:15d9501bf5b3 13 void setPLL1Frequency(unsigned char clkSrc, unsigned short M, unsigned char N);
steniu01 2:15d9501bf5b3 14 #endif