Welcome Guest! To enable all features please Login.

Notification

Icon
Error

The Timer Interruption Always Loop
teaone
#1 Posted : Friday, June 16, 2017 1:32:47 AM(UTC)
Rank: Newbie

Joined: 6/16/2017(UTC)
Posts: 1

Hello,all
I am begin to learn programming. Please give me some help. Appreciate it in advance !
The MCU I used is TM4C1230D5PMI.( This is the datasheet of TM4C1230D5PMI .) The program of initializion is given below:
[code]void TIMER0_INIT(void)
{
        SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);//enable TIMER0
        //TimerConfigure(TIMER0_BASE, TIMER_CFG_ONE_SHOT);//A single counting mode
        //TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC_UP);//Periodic counting mode, incrementing counter
        //TimerConfigure(TIMER0_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_B_PERIODIC);
        TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);//Periodic counting mode
        TimerLoadSet(TIMER0_BASE, TIMER_A,SysCtlClockGet() /12800);
        //TimerADCEventSet(TIMER0_BASE,TIMER_ADC_TIMEOUT_A);//Timeout triggers the sample set
        TimerControlTrigger(TIMER0_BASE,TIMER_A,true);
        //TimerADCEventGet(TIMER0_BASE);//Get if trigger ADC delayly
        IntEnable(INT_TIMER0A);//TIMEOUT sign bit trigger interruption
        IntPrioritySet(INT_TIMER0A,1);//priority 1
        TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT); //enable TIMER0A interrupt
        IntMasterEnable();
        TimerEnable(TIMER0_BASE, TIMER_A);//TIMER0A begin to count,when the value is equal to TimerLoadSet,trigger interruption
}[code]

I think my program is right,but it always loop? Why ? ? ? I didn’t debug other functions in the interrupt
function. I am upset I can’t find the wrongs !

Appreciate !
Blessing~
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 1.696 seconds.