11C24: SystemInit() influences IOCON?

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

11C24: SystemInit() influences IOCON?

898 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hobbiest on Wed Jan 16 13:31:36 MST 2013
After digging out again my LPCXpresso (11C24) I started to adapt cr_startup_lpc11.c from http://www.lpcware.com/modules/pubdlcnt/pubdlcnt.php?file=http://www.lpcware.com/sites/default/files...
Because I just need the reset configuration (IRC with 12 MHz, no PLL, no WDT, SSP) I just commented out SystemInit() in system_LPC11xx.c.

As a result IOCON now have all pullups disabled:confused: (0x0 instead of 0xd). I can't see any relationship between changing the reset values of IOCON and not to call SystemInit() during startup. Can please anyone open my eyes? I use LPCXpresso v5.0.14 [Build 1063] [2012-12-19] on Kubuntu 12.04 (64 bit).
0 Kudos
Reply
2 Replies

884 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hobbiest on Thu Jan 17 13:11:40 MST 2013
Thank you for your reply. You are right.

Because I didn't need to change anything in IOCON I did't clock it in SYSAHBCLKCTRL. But then later during exploration of the registers and their values I read out IOCON. But reading an unclocked register isn't very clever:(. After the line writing 0x0001005F to SYSHABCLKCTRL in main() IOCON displays the correct values. But the reset values are still active at the pins before that line of code (checked with DMM). So all is fine now for me:).

Offtopic: If Code Red is out there: In the debug peripheral window the 32 bit timers should be named TMR32x in accordance to the 16 bit timers TMR16x (and not just TIMERx).
0 Kudos
Reply

884 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Wed Jan 16 15:48:27 MST 2013
Hi!

SystemInit() configures SYSAHBCLKCTRL and turns on some peripherals that are not enabled by default out of reset, such as IOCON.  Maybe this is causing the problem.

-Dave @ NXP
0 Kudos
Reply