IO Port speed does not match BUSCLK frequency

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IO Port speed does not match BUSCLK frequency

跳至解决方案
1,196 次查看
silviopistolesi
Contributor II

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

标记 (2)
1 解答
919 次查看
chris_brown
NXP Employee
NXP Employee

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

在原帖中查看解决方案

2 回复数
920 次查看
chris_brown
NXP Employee
NXP Employee

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

919 次查看
silviopistolesi
Contributor II

thanks!

Now it's ok.