lpcware

LPC1113FBD48/301 Clockout problem

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
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)
    {
    }

}

Outcomes