lpcware

Clearing a bit in SYSAHBCLKCTRL

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by ECamino on Mon Mar 11 07:00:02 MST 2013
Hi,

I'm working with LPC1347.  I'm  having trouble with IAP call for bootloading.  It's intermittent even after disabling all peripheral timers.  I think the problem is my USART.  I would like to turn off/disable the previously enabled USART peripheral. 

Stepping through and watching SYSCON.  I see that both these lines of code disables ALL the bits in SYSAHBCLKCTRL, except SYS (b0).
[SIZE=2]
LPC_SYSCON->[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]SYSAHBCLKCTRL[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] &=  (0<<12); [/SIZE]
[SIZE=2]LPC_SYSCON->[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]SYSAHBCLKCTRL[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] &=  0xFFFFEFFF; [/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]I just want to clear SYSAHBCLKCTRL b12.  Why doesn't the code above work and how do you clear a single bit in SYSAHBCLKCTRL?[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]Thanks,[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]EC[/SIZE]

Outcomes