Hi,
I am trying to toggle a GPIO Pin and it seems to be extremely slow.
My ucontroller main clock is at 120MHz.
I deleted the in-between delay but still it is ver slow.
Here is how my clock is configured. I have verified the clock is at 120MHz by reading uint32_t sys_clock.
// Initialize system clock to 120 MHz // uint32_t sys_clock; sys_clock = ROM_SysCtlClockFreqSet( (SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), SYSTEM_CLOCK); ASSERT(sys_clock == SYSTEM_CLOCK);
And the code for toggling the Pins;
void adc_conv_start (void) { GPIOPinWrite(ADC_CTRL1_PORT,ADC_CNVSTARTA |ADC_CNVSTARTB ,0); //for(i=0;i<1;i++){} //SysCtlDelay(1); GPIOPinWrite(ADC_CTRL1_PORT, ADC_CNVSTARTA | ADC_CNVSTARTB, ADC_CNVSTARTA | ADC_CNVSTARTB); }
And here is the snapshot from the scope showing a delay of 3.9 usec.