KL25, external oscillator 8Mhz, core freq. 48Mhz, bus freq. 24Mhz.
when I test the bus speed with the following code, the max freq. speed is 8 Mhz and not 24Mhz, why?
How do I must configure the microprocessor?
while (1)
{
GPIOB_PCOR = 0x00000100;
GPIOB_PSOR = 0x00000100;
GPIOB_PCOR = 0x00000100;
GPIOB_PSOR = 0x00000100;
GPIOB_PCOR = 0x00000100;
GPIOB_PSOR = 0x00000100;
GPIOB_PCOR = 0x00000100;
GPIOB_PSOR = 0x00000100;
GPIOB_PCOR = 0x00000100;
GPIOB_PSOR = 0x00000100;
}
Thanks
已解决! 转到解答。
Hi Silvio,
You're not actually using the IO Port in your code. If you want to use the IO Port, write FGPIOB_PCOR = <value> instead.
Also, remember that the while(1) will take instruction cycles and your compiler settings may compile the statements into multiple instructions. So you may still not be able to achieve pin toggling at half the core clock frequency.
Thanks,
Chris
Hi Silvio,
You're not actually using the IO Port in your code. If you want to use the IO Port, write FGPIOB_PCOR = <value> instead.
Also, remember that the while(1) will take instruction cycles and your compiler settings may compile the statements into multiple instructions. So you may still not be able to achieve pin toggling at half the core clock frequency.
Thanks,
Chris