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.

problem debugging TIMER1_A0

Other Parts Discussed in Thread: MSP430G2553

Hi folks, 


I'm debugging some code for a 'G2533, and having a problem stepping through the TIMER1_A0 interrupt routine. In the advanced clock control options I've got ACLK, SMCLK checked. In my TIMER0_A0 ISR, it stops the clock (SMCLK) when I breakpoint, but in my TIMER1_A0 ISR the ACLK clock continues to run.

Has anyone else run into this problem? I've never run into this in earlier MSP430's, is this a problem with the G series? Or parts with two TIMERA3 modules? I'm running IAR 5.60.1 (workbench 6.6.2).


Thanks, Mike.

  • I dont have informations abut you clock system configuratin
    but I take a guess then you SMCLK=DCOCLK=MCLK
    so when you stopped CPU (MCLK clock) then SMCLK is
    also stopped,

    ACLK is probably sourced from external quartz,
    so when you stopped CPU quartz is still working,

    look on sleep modes LPM, CPU is also stopped but
    timers can working,

  • I've just tried this on an MSP430G2553 on a launchpad using CCS6.

    By default the debugger halts MCLK, SMCLK and ACLK. In the MSP430 debugger options I can set it to allow ACLK to continue while paused. This works as you would expect.

    I tried setting the debugger to allow SMCLK to continue, but that didn't work. I think that's due to limitations of the XS emulation module in the 2553.

    Perhaps the behaviour you're seeing is a bug in IAR - it's ignoring the advanced clock control setting for ACLK, unlike CCS6.

  • Contrary to my last post, I've just confirmed the behaviour you've been seeing.

    Everything worked as described in my previous post when using ACLK for timerA0 and SMCLK for timerA1. Then I noticed that you were using SMCLK for timerA0 and ACLK for timerA1.

    Swapping the clock sources over resulted in timerA1 continuing to count (ACLK cycles) while the debugger was paused, even though I'd chosen to halt ACLK on pause. With both timers using ACLK I got the same result. TimerA0 stopped, timerA1 continued.

    EDIT: Further confirmation of this - I outputted ACLK and SMCLK to P1.0 and P1.4, respectively. ACLK continues to operate when paused, but SMCLK is halted. It seems that the EEM always turns off SMCLK and leaves ACLK running when the debugger halts execution. The clock control setting for ACLK conditionally disables the ACLK input to timerA0, but not timerA1. I haven't checked the other peripheral modules to see what their behaviour is.

  • I wasted hours trying to find why my TA1.0 IRQ was not working, it was due to having debug (either log or code)
    and after it hits the ACLK on a 32K crystal stops working. 
    I think it's due to the small pause and it misses compare value, as if I wait for timer rollover (64 seconds).

    Where in IAR is clock settings for debug?

    msp430G2553

**Attention** This is a public forum