This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Generating 1Mhz Signal using TM4C123GH6PM

Dear All 

I am trying to generate a 1Mhz Signal for supplying clock to an external Sensor and  i need to generate another Pules for signal capturing the analog signal from the *** at evey 83 clock , however i am trying to configure the Timer Module using PWM function to run at 1 Mhz but i am unable to generate an interrupt, and i tried configuring the same in GPTM mode but my frequency reduces to Khz  when i place an I/O pin function. here with i am attaching the code for the same 

FYI :- i am using the library functions form the TIVA ware  

int main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL
| SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_3
|GPIO_PIN_2|GPIO_PIN_1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
TimerConfigure(TIMER0_BASE, TIMER_CFG_A_PERIODIC);
TimerClockSourceSet(TIMER0_BASE,TIMER_CLOCK_SYSTEM);
TimerLoadSet(TIMER0_BASE, TIMER_A,5);
IntEnable(INT_TIMER0A);
TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
toggle = 0x00000000;
TimerEnable(TIMER0_BASE, TIMER_A);
while(1)
{

}
}

my interrupt code is 

void timer_A_0_Int(void)
{
TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
toggle ^=0x00000002;
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, toggle);


}

pls suggest any alternative way for the same and if there is any reference for register direct method also pls suggest , my guess is using library function take more clock cycles to execute