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.
Hello,
can I skip the timer interrupt when I am debugging. It waste my lots of time when every timers the interrupt of timer was called.
Thanks for help.
how?
When I set (Disable interrupts -> When source stepping), the timer interrupt was still called.
Hey,
I dont realy now, whats your code is and the purpose of your code. If you just want to debug without being interrupted by Timer Interrupt. Just disable Timer inerrupt. For example this function below set the timer to interrupt for every 4 milli seconds.
void monitor_TA1( void) { /***************Clear Timer Flags before Configuring them******************************/ stop_TA1(); I2CWATCH_4_Accel = 0; // PWM Period = VOLUME_TOP/SMCLK TA1CCR0 = FOUR_MILLISECOND; // PWM Period = 4ms TA1CCR1 = FOUR_MILLISECOND; //set up interrupts for counting the #ticks# TA1CCTL1 = CCIE; // SMCLK, no divider, counting up mode TA1CTL = TASSEL_2 + MC_1; }
if you do not want to get disturbed by interrupts of Timer change this to
//set up interrupts for counting the #ticks# TA1CCTL1 = CCIE;
This
//Stop interrupts for counting the #ticks# TA1CCTL1 &= ~CCIE;
Alternatively, you can also stop timer
// SMCLK, no divider, stop TA1CTL = TASSEL_2 + MC_0;
Hi guys,
thanks for helps. I think I dont say my intent clearly. I dont want to disable timer interrupt. What I want is to not showing when I am debugging my programm. The timer interrupt is still enable, but not showing when step to step debugging.
:) till this point of time, this is one of impossible things. If there is a way to achieve this, I will be very happy. These many days I am just working around this type of issue.
I am waiting with you to see if any one comes up with a solution (that exactly you are looking for.).
Cheers. :)
You can’t have them all!
Normally; if you are stepping trough the program you don’t want to get any interrupt, you only wants to see what happens during these, observed, steps. In the Register view you can see if an interrupt is hit.
The common way to debug is to disable debug interrupts, put a breakpoint into the ISR, or elsewhere in your program, on the lines you want to observe, and RUN the program till the next point of interest.
Well by the time you learn more about programming processors and learning to build-up your program step-by-step and not many new items at the same time, gets a little bit more familiar with MSP MCU’s, not need to debug hole your code (functions) at the same time, you will see these options are enough.
The right way to do it is:
- right click on project
- select Properties
Go to Debug->Program/Memory Load
Check the Disable Interrupts group: tick "When source stepping"
Apply. From next run it will work.
**Attention** This is a public forum