Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

How to set interrupt mask whilst single stepping

How to set interrupt mask whilst single stepping

2013-02-06 by Dave McLaughlin

Hi all,

 

I have had to switch back to Studio 4 until Atmel sort out the bug with JTAG
ICE2 and Studio 6

 

Since doing so, I can't find the option to set interrupt mask during single
stepping so every time I single step my code, I end up in one of the 2
interrupt handlers! Make debugging a nightmare.

 

I don't recall this being an issue before but I can't find any setting to
sort this out.

 

Appreciate any pointers.

 

Dave.

 

 



[Non-text portions of this message have been removed]

Re: How to set interrupt mask whilst single stepping

2013-02-06 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "Dave McLaughlin"  wrote:
> I can't find the option to set interrupt mask during single
> stepping [...]
Choose a view that shows the registers including SREG.  Click on the I bit in the SREG display and it will toggle.  Then, you can single step without vectoring to an ISR.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Re: [AVR-Chat] How to set interrupt mask whilst single stepping

2013-02-06 by John Samperi

At 12:49 AM 7/02/2013, you wrote:
>Since doing so, I can't find the option to set interrupt mask during single
>stepping so every time I single step my code, I end up in one of the 2
>interrupt handlers! Make debugging a nightmare.

You can stop the stop timers from running on break, is this what you want?

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] How to set interrupt mask whilst single stepping

2013-02-06 by Jim Wagner

Go to the view of the peripheral registers and clear the interrupt enable bits of the timers or other devices that are making things hard. Or, go to the Status Register and clear the global interrupt enable bit. 


Jim Wagner 
Oregon Research Electronics 
Show quoted textHide quoted text
----- Original Message -----
From: "John Samperi" <samperi@ampertronics.com.au> 
To: AVR-Chat@yahoogroups.com 
Sent: Wednesday, February 6, 2013 11:12:57 AM 
Subject: Re: [AVR-Chat] How to set interrupt mask whilst single stepping 






At 12:49 AM 7/02/2013, you wrote: 
>Since doing so, I can't find the option to set interrupt mask during single 
>stepping so every time I single step my code, I end up in one of the 2 
>interrupt handlers! Make debugging a nightmare. 

You can stop the stop timers from running on break, is this what you want? 

Regards 

John Samperi 

******************************************************** 
Ampertronics Pty. Ltd. 
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA 
Tel. (02) 9674-6495 
Website http://www.ampertronics.com.au 
*Electronic Design * Custom Products * Contract Assembly 
******************************************************** 




[Non-text portions of this message have been removed]

RE: [AVR-Chat] How to set interrupt mask whilst single stepping

2013-02-07 by Dave McLaughlin

Thanks John and all,

 

It's not just the timer interrupt, I also have CAN bus interrupts running.
The timers halted option is set anyway.

 

I don't recall ever having to disable interrupts before. 

 

Doing a search I come across a few references to an option to mask
interrupts during single stepping but can't find this in Studio 4

 

 

Dave.
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of John Samperi
Sent: 07 February 2013 02:13
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] How to set interrupt mask whilst single stepping

 

  

At 12:49 AM 7/02/2013, you wrote:
>Since doing so, I can't find the option to set interrupt mask during single
>stepping so every time I single step my code, I end up in one of the 2
>interrupt handlers! Make debugging a nightmare.

You can stop the stop timers from running on break, is this what you want?

Regards

John Samperi





[Non-text portions of this message have been removed]

Re: [AVR-Chat] How to set interrupt mask whilst single stepping

2013-02-07 by Jim Wagner

I believe that the ONLY way to mask interrupts while single-stepping is to clear the IE flag bit in the Status Register.

Jim Wagner

On Feb 6, 2013, at 6:54 PM, Dave McLaughlin wrote:

> Thanks John and all,
> 
> It's not just the timer interrupt, I also have CAN bus interrupts running.
> The timers halted option is set anyway.
> 
> I don't recall ever having to disable interrupts before. 
> 
> Doing a search I come across a few references to an option to mask
> interrupts during single stepping but can't find this in Studio 4
> 
> Dave.
> 
> From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
> Of John Samperi
> Sent: 07 February 2013 02:13
> To: AVR-Chat@yahoogroups.com
> Subject: Re: [AVR-Chat] How to set interrupt mask whilst single stepping
> 
> At 12:49 AM 7/02/2013, you wrote:
> >Since doing so, I can't find the option to set interrupt mask during single
> >stepping so every time I single step my code, I end up in one of the 2
> >interrupt handlers! Make debugging a nightmare.
> 
> You can stop the stop timers from running on break, is this what you want?
> 
> Regards
> 
> John Samperi
> 
> [Non-text portions of this message have been removed]
> 
> 



[Non-text portions of this message have been removed]

Re: How to set interrupt mask whilst single stepping

2013-02-25 by David V

--- In AVR-Chat@yahoogroups.com, Jim Wagner <wagnejam99@...> wrote:
>
> I believe that the ONLY way to mask interrupts while single-stepping is to clear the IE flag bit in the Status Register.


S6 has an option to "hide" the interrupts from you, but it doesn't seem to work very well yet.  You can turn off specific ints in S4 while stepping, just clear the appropriate enable bits. You can also just disable all.

I will frequently use a debug equate for this.

.equ debug = true ;

.... Init code happens... then just before main where I would SEI.

.if debug
 ; leave ints off for debug!
.else
    sei
.endif

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.