Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
3 years, 5 months ago.
Need help with saving power, i.e. down clock for LPC1768
I am developing small project with my mbed LPC1768 005.1.
It is about reading from 2 temperature sensors MLX90615 via I2C @ 25khz, every 15 (20 also will do) minutes, log data to flash memory. Between readings, device should save power as much as possible. Device should operate 30-48 hours, from 9V brick battery, noname (as I'm in small town far from big towns, no alkaline battery available).
Semihost disable - I will be using it, but I should learn timings to disable it before sleep and enable again to be able write log data.
I learned about PHY powerdown and applied it. Some peripherals also powered off (I made small excel file to make easier switch on/off necessary peripheral, but couldn't share it here, even as ZIP file. Can I use file sharing services?).
But despite all my research here, I couldn't find out how to run processor clock at lowest value possible. 48, 24, 12Mhz - how I can achieve that?
Also trying enable and use RTC with 3.3V battery, so it can keep time and program could read time and log it too.
Also should mention that: I am using gcc4mbed (thanks to all wizards who made it possible), it helps me very much here, when I have no internet.
below my pseudocode (I will clean out and share it via mbed site when i will have better connection):
- include "mbed.h"
- include "string.h"
- include "stdlib.h"
- include "ClockControl/ClockControl.h"
- include "PowerControl/PowerControl.h"
- include "PowerControl/EthernetPowerControl.h"
- define USR_POWERDOWN (0x104)