Lpc_syscon->sysahbclkctrl

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lpc_syscon->sysahbclkctrl

843 Views
lpcware
NXP Employee
NXP Employee
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.
0 Kudos
3 Replies

581 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sense on Thu Mar 03 06:05:44 MST 2011
oooops :-DDD

thanks a lot!


now i got Idd = 3.99  on 12 mhz

is it possible to get 3? :cool:
0 Kudos

581 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Mar 03 05:50:00 MST 2011
Just a little typo :)
Try:

[FONT=Courier New]LPC_SYSCON->SYSAHBCLKCTRL &= ~(1<<11) //disable clock for SPI0[/FONT]

Your code resets complete LPC_SYSCON-> SYSAHBCLKCTRL :eek:

Note:

UM10398 Table 20 shows all SYSAHBCLKCTRL bits:

LPC_SYSCON->SYSAHBCLKCTRL &= ~(1<<12) //disable clock for UART
0 Kudos

581 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Thu Mar 03 05:48:29 MST 2011
Hello [B]Lpc_syscon->sysahbclkctrl,[/B]

try as solution:

[FONT=Courier New]LPC_SYSCON->SYSAHBCLKCTRL &= (0<<11) ;[/FONT]

[FONT=Courier New]should be ...[/FONT]

[FONT=Courier New]LPC_SYSCON->SYSAHBCLKCTRL &= ~(1<<11) ;[/FONT]
0 Kudos