SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By janostman
#171414
Thought I try some DUE overclocking just for the fun of it.
I have a need to try the limits on everything that I work with :)

I love working with the DUE.
It's a great platform for fast mockups with the ARM Cortex MCU.
Wondered why it's limited to 84Mhz I tried some different PLL MUL/DIV settings.

It seem that 120MHz is max what the SAM3X8E Cortex M3 chip will run.
This is not because of the flash read speed but because of the internal SRAM speed and that has no waitstate setting.

So at 114MHz it runs stable with the original 4FWS setting (22MHz AHB bus-speed).

That is 136% overclocking without any problems.
Code: Select all
#define SYS_BOARD_PLLAR (CKGR_PLLAR_ONE | CKGR_PLLAR_MULA(18UL) | CKGR_PLLAR_PLLACOUNT(0x3fUL) | CKGR_PLLAR_DIVA(1UL))
#define SYS_BOARD_MCKR ( PMC_MCKR_PRES_CLK_2 | PMC_MCKR_CSS_PLLA_CLK)
        
/* Set FWS according to SYS_BOARD_MCKR configuration */
EFC0->EEFC_FMR = EEFC_FMR_FWS(4); //4 waitstate flash access
EFC1->EEFC_FMR = EEFC_FMR_FWS(4);

/* Initialize PLLA to 114MHz */
PMC->CKGR_PLLAR = SYS_BOARD_PLLAR;
while (!(PMC->PMC_SR & PMC_SR_LOCKA)) {}

PMC->PMC_MCKR = SYS_BOARD_MCKR;
while (!(PMC->PMC_SR & PMC_SR_MCKRDY)) {}
Putting the code above as the first lines in your project setup section will overclock it.
Don't worry, It wont break anything but could affect stability depending on what perferials you use :)
By janostman
#171415
The NXP LPC series that I work with are more willing to overclock.

For example the LPC-8xx rated for 30MHz runs just fine at 48MHz and begins to randomly fail at 72MHz.
That is in the range of 160 - 240% overclocking.

Does NXP build better chips than Atmel :lol:
User avatar
By Ross Robotics
#182647
Google
By HermannSW
#187184
Hi,

first I tried to do the changes in "libsam_sam3x8e_gcc_rel.a" but it did not work:
http://forum.arduino.cc/index.php?topic ... msg2556484

Next I followed your instruction and added your code as fist lines in Setup().
Uploading Blink example did work.
Stopped 15 blinks with stop watch, takes only 23.81s now instead of 30.22s normally.
So overclocking works, and measurement (inaccurate, manual), shows 106MHz:
Code: Select all
$ bc -lq
30.22/23.81*84
106.61402771944561108752
But any example with Serial communication does show garbage only in Serial Console.

Do you have a trick to make Serial communication work with overclocking?

Hermann.