IO Port speed does not match BUSCLK frequency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IO Port speed does not match BUSCLK frequency

Jump to solution
979 Views
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

Tags (2)
1 Solution
702 Views
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

View solution in original post

2 Replies
703 Views
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

702 Views
silviopistolesi
Contributor II

thanks!

Now it's ok.