How to switch to internal Oscillator?

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
babazaroni
Experienced Member
Posts: 94
Joined: Sun Feb 10, 2013 4:47 am

How to switch to internal Oscillator?

Post by babazaroni »

A mistake on our pc-board is forcing the U6 to boot from an external oscillator. I need to switch to the internal 20mhz oscillator and reprogram the external oscillator chip via i2c, then switch back to the external oscillator.

The pin selecting internal/external oscillator at bootup, OSC_EXT_N, is connected under the chip, so it can't be modded without removing the chip.

Is there a way to switch to the internal oscillator after the U6 has booted?

OK, I've rtfm'd and found the General Oscillator Control register. This should allow me to switch between internal and external oscillator at will.


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Hi - I think the code you need can be extracted from here:

https://github.com/xcore/sc_a_series_su ... t_sleep.xc

The sleep code switches to the internal oscillator as part of the power down sequence. The code says it's for A series - but the silicon that does this function is the same as in the U-series so the code can be re-used.
Post Reply