lpcware

Lpc_syscon->sysahbclkctrl

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by sense on Thu Mar 03 05:13:04 MST 2011
hi all!

i have LPC1114 LPCXpresso board and using  LPCXpresso v3.6.2.

datasheet says:
typ Idd=3 ( LPC1100 series system clock = 12 MHz, VDD = 3.3 V).
IDD measurements were performed with all pins configured as GPIO outputs driven LOW and pull-up resistors disabled

so i made "no pull-down/pull-up resistor enabled"   for every port. is that correct?

then..... IRC enabled; system oscillator disabled; system PLL disabled. BOD disabled.

i made:
[FONT=Courier New]      LPC_SYSCON->MAINCLKSEL    = 0x00;     // mainclock -> IRC osc
      LPC_SYSCON->MAINCLKUEN    = 0x01;               // Update MCLK Clock Source //
      LPC_SYSCON->MAINCLKUEN    = 0x00;               // Toggle Update Register   //
      LPC_SYSCON->MAINCLKUEN    = 0x01;
      LPC_SYSCON->PDRUNCFG        &= (1<<3);  //BOD off
      LPC_SYSCON->PDRUNCFG        &= (1<<4);  //adc off
      LPC_SYSCON->PDRUNCFG        &= (1<<5);  //sysosc off
      LPC_SYSCON->PDRUNCFG        &= (1<<6);  //watchdog off
      LPC_SYSCON->PDRUNCFG        &= (1<<7);  //syspll off[/FONT]

next.... All peripherals disabled in the SYSAHBCLKCTRL register. Peripheral clocks to UART and SPI0/1 disabled in system configuration
block.



when iam trying to do
[FONT=Courier New]LPC_SYSCON->SYSAHBCLKCTRL &= (0<<11)  //disable clock for SPI0[/FONT]
debug is stopping
[IMG]http://img163.imageshack.us/i/myerror.jpg/[/IMG]
[IMG]http://img163.imageshack.us/img163/8218/myerror.jpg[/IMG]

am i doing something wrong? how should i disable clocks for spi/uart ? UARTCLKDIV=0 ?

without [FONT=Courier New]LPC_SYSCON->SYSAHBCLKCTRL &= (0<<11) i got IDD = ~4.9[/FONT] mA

thanks.

Outcomes