<figcaption>Ring oscillator with ATSAM4S</figcaption>
<figcaption>Ring oscillator with ATSAM4S</figcaption>
</figure>
</figure>
<p>This ring oscillator runs on the ATSAM4S MCU using the XPlained Pro Dev Kit. The ATSAM4S has an ARM Cortex-M4 running with a max speed of 120 MHz. C code for the oscillator is available <ahref='atsam4s_main.c'>here</a>, or visible below.</p>
<p>The system clock is sensitive near its maximum with the ring frequency decreasing dramatically if a threshold is exceeded for the system clock. Strangely enough, the fastest ring oscillators occured for system clocks of less than 120 MHz. The code above shows how to use both the internal oscillator to feed the PLL, as well as a 12 MHz external oscillator.</p>
<p>The code also shows how to use the Atmel software framework calls. This runs roughly half as fast as the direct port manipulation.</p>