Did I set the frequency correctly?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I have EVK1101 board with AVR32 UC3B0256 and 12MHz crystal.
In my code, I wanted to make the uC work at 66MHz (it is a little bit overclocked):

#define FOSC0 12000000
#define OSC0_STARTUP AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC

pm_switch_to_osc0(pm,FOSC0, OSC0_STARTUP);
pm_pll_setup(pm, 0,10,1,0,16);
pm_pll_set_option(pm,0,1,1,0);
pm_pll_enable(pm,0);
pm_wait_for_pll0_locked(pm);
pm_cksel(pm,1,0,0,0,0,0);
flashc_set_wait_state(1);
pm_switch_to_clock(pm,AVR32_PM_MCCTRL_MCSEL_PLL0);

Did I set everything correctly and my uC works at 66MHz?

Thanks in advance for your help.

Regards.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,
why do you want to over clock the µC? Do you really think you need this CPU power? Nobody will give you any support if you run the µC outside its specs.
On the other hand the setup would be ok for what you want to do. Check it any way by GClk or timer output. But may be it won't work because you are over clocked. And you don't know if you are wrong or the µC can't handle it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Thanks for your answer. Yes, I need extra uC power. The reason I've migrated from AVR ATmega to AVR32 was extra power needed. I had used ATmega32 for years and always overclocked it (to 18,3MHz) because I do needed more power and never had problems. I work on 1kHz inverter for resistance welders.