LPC1113FBD48/301 Clockout problem

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

LPC1113FBD48/301 Clockout problem

202 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iss2341 on Thu Jul 31 07:01:17 MST 2014
Hello,

I recently bought an LPC1113 uC from RS Components and soldered it onto a breakout board. I am now trying to get it to output a clock signal on the PIO0_1 pin, but have not succeeded so far :(. I use an FTDI chip to program it with FlashMagic (I use the CooCox IDE). Here is the code I used. Any help will be appreciated, maybe I am missing something.

#define SYSAHBCLKDIV             (*((volatile unsigned long *)0x40048078))
#define SYSAHBCLKCTRL             (*((volatile unsigned long *)0x40048080))

#define IOCON_PIO0_1             (*((volatile unsigned long *)0x40044010))

#define MAINCLKSEL             (*((volatile unsigned long *)0x40048070))
#define MAINCLKUEN            (*((volatile unsigned long *)0x40048074))

#define CLKOUTCLKSEL             (*((volatile unsigned long *)0x400480E0))
#define CLKOUTUEN              (*((volatile unsigned long *)0x400480E4))
#define CLKOUTCLKDIV              (*((volatile unsigned long *)0x400480E8))



int main(void)
{
SYSAHBCLKDIV &=0xFFFFFF00;
SYSAHBCLKDIV |=0x00000001;

MAINCLKSEL &=0xFFFFFFFC;
MAINCLKUEN &=0xFFFFFFFE;
MAINCLKUEN |=0x00000001;

SYSAHBCLKCTRL |=0x00018000;


IOCON_PIO0_1 &= 0xFFFFFFF8;
IOCON_PIO0_1 |=0x00000001;

CLKOUTCLKSEL &=0xFFFFFFFC;
CLKOUTCLKSEL |=0x00000003;
CLKOUTCLKDIV &=0xFFFFFF00;
CLKOUTCLKDIV |=0x00000001;
CLKOUTUEN &=0xFFFFFFFE;
CLKOUTUEN |=0x00000001;

while(1)
    {
    }

}
Labels (1)
0 Kudos
1 Reply

187 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxp_apps on Sun Aug 03 20:12:10 MST 2014
Hi,

Please refer to the LPCOpen software platform.....there is a clockout example (periph_clkout) which you can use as a reference to help solve your issue. Hope this helps.

LPCXpresso IDE:
http://www.lpcware.com/system/files/lpcopen_v2_00a_lpcxpresso_nxp_lpcxpresso_11c24.zip

Keil and IAR:
http://www.lpcware.com/system/files/lpcopen_v2_00a_keil_iar_nxp_lpcxpresso_11c24.zip

Thanks.

nxp support
0 Kudos