Other Parts Discussed in Thread: TM4C123GH6PM
Hello guys. I want to reach toggle speed up to the CPU clock speed or at least the maximum achievable toggle speed on I/O pin. I read that the AHB buss is the one I need to use for the fastest GPIO frequency. I tried to make a code that can toggle GPIO with the max possible speed, but I reached only 3.7Mhz at 40Mhz clock speed.
int main(void)
{
SysCtlClockSet (SYSCTL_XTAL_16MHZ | SYSCTL_SYSDIV_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
SysCtlGPIOAHBEnable(SYSCTL_PERIPH_GPIOF);
SysCtlDelay(20);
GPIOPinTypeGPIOOutput(GPIO_PORTF_AHB_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 );
while(1)
{
GPIO_PORTF_AHB_DATA_R = 0x0E;
GPIO_PORTF_AHB_DATA_R = 0x00;
}
}
I believe the TM4C123G can go further.
Thank you in advance.