LPC1752 internal RC oscillator and the "main oscillator"

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

LPC1752 internal RC oscillator and the "main oscillator"

529 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by funbotix on Wed Mar 02 21:54:48 MST 2016
According to paragraph 3.7.1 on page 29 in rev 3.1 of the LPC176x/5x User Manual, bit 5 of the System Control and Status register may be used to enable the main oscillator.  The description says that when bit 5 is set
Quote:
The main oscillator is enabled, and will start up if the correct external circuitry is connected to the XTAL1 and XTAL2 pins.



My question is, then, does that mean if an application is using the internal RC oscillator, and it wants to use the PLL to get a faster CPU clock, should it NOT set bit 5 (since there will be no circuitry connected to the XTAL1 and XTAL2 pins)?

If I set bit 5 in that register using the internal RC oscillator as my clock source, sometimes bit 6 in that register (main oscillator status) will get set, indicating the main oscillator is ready for use, but sometimes it won't (and the startup code will hang forever waiting for bit 6 to get set), and sometimes after a few to many seconds bit 6 will eventually get set. 

Should I NOT be enabling the main oscillator if I want to use the PLL with the internal RC oscillator?  If the answer to that is no, can someone give me an idea as to why the main oscillator "ready" status bit behaves so unpredictably, and sometimes never gets set?

Thanks.
Labels (1)
0 Kudos
Reply
2 Replies

506 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

506 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by funbotix on Thu Mar 03 14:22:47 MST 2016
Well, I stopped enabling the main oscillator and testing for it to be ready, and everything seems to work fine now.

After going back to the datasheet and looking at the clock generation figure on page 30 of the user manual, it doesn't really show the main oscillator.  So, it would appear that it must be before the SYSCLK mux.  So, it would seem then that the internal RC oscillator is not an input to the main oscillator so there's no reason to enable the main oscillator.

Just thought I'd share that as an answer to my own question.

Thanks.
0 Kudos
Reply