clockout

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

clockout

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MARCOS_NAUT1 on Fri Jan 18 08:35:18 MST 2013
For LPC1113 the clockout is configure in pin 4 PIO0_1  *** IOCON_PIO0_1  = 0x00000001;       // CLOCKOUT  ***
but not frequency out this pin??? what more is need?
Labels (1)
0 Kudos
4 Replies

398 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 1234567890 on Sat Dec 28 06:11:09 MST 2013
Bit 6 in PDRUNCFG is an issue as well ...
Unfortuntely this is not documented very well in the UM. At least not at the place one would look for, e.g. watchdog oscillator control register or watchdog timer. Minimum would be a 'remark' at watchdog oscillator control register.
0 Kudos

398 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Oct 30 15:27:19 MST 2013
Jim,

Zero isn't member of this forum since 'Forum Migration #1' in March (therefore 'Ex-').

You can add a while loop to check clockout:

....
LPC_SYSCON->CLKOUTUEN = 0;
LPC_SYSCON->CLKOUTUEN = 1;

while (!(LPC_SYSCON->CLKOUTUEN & 0x01));


What is not working? Did you scope PIO0_1? Did you use debugger to check IOCON settings of PIO0_1?

A forgotten IOCON bit in SYSAHBCLKCTRL could cause your problem....
0 Kudos

398 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jim_Andrews on Wed Oct 30 14:53:35 MST 2013

Quote: Ex-Zero
You have to set source / divider and start clockout as described in User Manual.

<code>
//enable CLKOUT
LPC_IOCON->PIO0_1= (1<<0);
// select clock 0 IRC, 1 System oscillator, 2 Watchdog, 3 Main clock
LPC_SYSCON->CLKOUTCLKSEL = 3;
// select clock divider
LPC_SYSCON->CLKOUTDIV = 10;//CLKOUT Divider = 10
// Enable CLKOUT
LPC_SYSCON->CLKOUTUEN = 0;
LPC_SYSCON->CLKOUTUEN = 1;
</code>



Hello Ex-Zero,
I tried to follow the instructions in the user manual, but it still doesn't work. Any idea what I am doing wrong?
0 Kudos

398 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Jan 18 19:22:32 MST 2013
You have to set source / divider and start clockout as described in User Manual.

<code>
//enable CLKOUT
LPC_IOCON->PIO0_1= (1<<0);
// select clock 0 IRC, 1 System oscillator, 2 Watchdog, 3 Main clock
LPC_SYSCON->CLKOUTCLKSEL = 3;
// select clock divider
LPC_SYSCON->CLKOUTDIV = 10;//CLKOUT Divider = 10
// Enable CLKOUT
LPC_SYSCON->CLKOUTUEN = 0;
LPC_SYSCON->CLKOUTUEN = 1;
</code>

0 Kudos