AnsweredAssumed Answered

Abysmally-slow IO toggling

Question asked by dave408 on Apr 29, 2015
Latest reply on Jul 9, 2015 by dave408

I'm sure I'm doing something wrong here, I just don't know what it is.

 

I have a test KSDK + PEx project for a FRDM-K22F and I am just tight looping, toggling a single GPIO.  I have set my clock configuration to 1 (maximum) and yet my output frequency is just under 780kHz.  Is there something I'm missing here?

 

My test app is literally Create New -> FRDM-K22F -> KSDK + PEx -> add fsl_gpio -> bitbang in while loop.

 

With default "max speed" clock settings:

FRDM-K22F: 780kHz

FRDM-K64F: 760kHz

  • In this particular case, I configured UART1 TX on PTC4 and output characters with UART_DRV_SendData().  My best guess from the smallest pulse width when sending 0x55 is 3.68MHz.  Baud rate was set to max value of 7.5MHz

 

under mbed (just as a quick comparison)

FRDM-K64F: 640kHz

Outcomes