I have been running 72MHz on my first kit MCBSTM32, but when I try to run the same code on the STM32F10x-EVAL it does´t work. If I drop the frequency to 48MHz by changing the PLLMUL ( x 9) it works again?? Any ideas to get it to run 72MHz? -Niels
I can set the micro to run 72MHz, and it is running 72MHz. I have verified it by outputting the clock on the MCO pin. The APB1 prescaler is set to 4 so it should not be a problem.
It seems like the program is running for a very short periode of time, and then it brakes down. And still, if I set the clock to 48MHz there is no problems with the samne code. Any good ideas to this problem? -Niels
Just lucky i think, its not specced to run with less than 2 at that speed but there is some tollerance and variation between micros, you just got one that just managed it before :) [ This message was edited by: giles on 09-04-2008 12:36 ]
But still... I think it is a bit strange, that the other kit also with a STM32 could run 72MHz without changing the latency? Is there a good explanation of that or was I just ''lucky'' -Niels And again, thanks a lot. Nice with some good help.
FLASH->ACR = 0x10 | 0x2; 0x10 is enable prefetch (bit 4) the first 2 bits are the latency less than 24Mhz set to 0 less than 48 but 24 or more set to 1 48+ set to 2 this should be set BEFORE you set thing to the PLL you want :) if you're using st's firmware library the 2 you're interrested in are : /* Enable Prefetch Buffer */ FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); /* Flash 2 wait state */ FLASH_SetLatency(FLASH_Latency_2); You are aware the max pin speed is 50Mhz (iirc)? so seeing it on the MCO at 72Mhz may be luck. have you tried something crude like timing a loop at 36Mhz then timing at 72Mhz outputting to a pin before and after to see if it is running ok so you're working within the pins speed :)?