Hello,
Having some issues in regards to the speed at which we can toggle GPIO pins.
The code below is the test we have been running and looking at with a logic analyser - we see 2mhz which seems awfully slow.
Is this accurate or are we making a obvious mistake?
#include <stdint.h> #include <stdbool.h> #include "inc/tm4c1294ncpdt.h" #include "driverlib/sysctl.h" int main(void) { volatile uint32_t ui32Loop; SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000); SYSCTL_RCGCGPIO_R = SYSCTL_RCGCGPIO_R7; ui32Loop = SYSCTL_RCGCGPIO_R; GPIO_PORTH_AHB_DIR_R = 0x01; GPIO_PORTH_AHB_DEN_R = 0x01; while(1) { GPIO_PORTH_AHB_DATA_R = 1; GPIO_PORTH_AHB_DATA_R = 0; } }