Thank you for your reply.
I had not seen the readme. It has helped somewhat, but I am still a long way off, seeing a curent of 450uA.
I have been through the schematic and set all pins to GPIO without pullup/pulldown. Those that are being driven by other sources on the board I have set as inputs and the all others as outputs driven low.
Looking at AHBCLKCTRL0/1 just before calling POWER_EnterDeepSleep only ROM, FLASH, FMC and PINT are running.
I am calling
POWER_EnterDeepSleep(SYSCON_PDRUNCFG_PDEN_SRAM0_MASK);
which I believe is turning off everything except SRAM0.
I have now built a minimal LPC51U68 system, started a new project, used configtools to set all PIO to output, no pullup/down and initial value of 0. The clock is the 12Mhz FRO. With nothing connected to any PIO I am still seeing a current around 450uA, so presumably something is still powered on or being clocked.
Below is my very simple code. I have not yet setup any means of wakeup in this test.
Regards
Tim.
#include <stdio.h>
#include "board.h"
#include "peripherals.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "LPC51U68.h"
#include "fsl_debug_console.h"
#include "fsl_gpio.h"
/* TODO: insert other include files here. */
/* TODO: insert other definitions and declarations here. */
/*
* @brief Application entry point.
*/
int main(void) {
volatile uint32_t count = 0;
/* Init board hardware. */
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
/* Init FSL debug console. -- NOT Using Console */
// BOARD_InitDebugConsole();
while (1)
{
count = 0;
GPIO_PinWrite(GPIO, 1U, 10U, 1); //turn off GREEN LED
GPIO_PinWrite(GPIO, 1U, 9U, 1); // Turn off BLUE LED
while ( count < 10000000) // Delay approx 10 secs
count++;
count = 0;
GPIO_PinWrite(GPIO, 0U, 29U, 1); // Turn off RED LED
SYSCON->BODCTRL &= ~0x4; // Disable BOD
SYSCON->BODCTRL |= 0x40;
CLOCK_DisableClock(kCLOCK_Gpio0); // Turn off unneeded clocks
CLOCK_DisableClock(kCLOCK_Gpio1);
CLOCK_DisableClock(kCLOCK_Iocon);
POWER_EnterDeepSleep(SYSCON_PDRUNCFG_PDEN_SRAM0_MASK); // Enter deep sleep just leaving SRAM0 powered
}
}