- Mon May 07, 2012 11:47 am
#144072
Hi,
I've just started working with the ARM-processors. I've currently written some code for working with my 5,7" display. Now I'm trying to increase my processor speed. My board (Olimex STM32-H107) has a 25 MHz external clock.
I'm trying to get a 50MHz speed, but I don't seem to get any improvements at all.
Here is my code based on the RM0008 reference manual:
Regards,
Simon H.A.
I've just started working with the ARM-processors. I've currently written some code for working with my 5,7" display. Now I'm trying to increase my processor speed. My board (Olimex STM32-H107) has a 25 MHz external clock.
I'm trying to get a 50MHz speed, but I don't seem to get any improvements at all.
Here is my code based on the RM0008 reference manual:
Code: Select all
What am I doing wrong? And also: What is the highest speed possible with a 25MHz external crystal? //External clock enable.
RCC_CR |= (1 << RCC_CR_HSEON_BIT);
while(!(RCC_CR & 0x20000));
//Sets HSE prescale by 2.
RCC_CFGR |= (1 << RCC_CFGR_PLLXTPRE_BIT);
//Use HSE as PLL input.
RCC_CFGR |= (1 << RCC_CFGR_PLLSRC_BIT);
//Set flash prefetch.
FLASH_ACR |= FLASH_ACR_PRFTBE;
//Set multiplier to x4.
RCC_CFGR |= (1 << 19);
//Enable Pll.
RCC_CR |= RCC_CR_PLLON;
while((RCC_CR & RCC_CR_PLLRDY) == 0);
Regards,
Simon H.A.