Hi
What is the max frequency i can toggle an IO pin using the MK20DX128 with 8Mhz crystal and PLL enabled to output 50Mhz?
I have used the ProcesssorExpert to configure the clock settings and i got the following configuration output:
Core clock: 50Mhz
Bus clock: 50Mhz
External bus close: 50Mhz
Flash clock 25Mhz
I wrote the code bellow for testing, but according with my scope the toggling frequency is only 3.571Mhz. From the disassembly i can see that 4 instructions are needed to toggle the pin, that makes the core speed at 4 * 2 * 3.571Mhz = 28.568Mhz???
{
| | //RED_TOGGLE; |
| | GPIOC_PTOR = 8; |
| | GPIOC_PTOR = 8; |
| | GPIOC_PTOR = 8; |
| | GPIOC_PTOR = 8; |
| } |
Regards,
Paulo