Yahoo Groups archive

AVR-Chat

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

Thread

interrupt emulation?

interrupt emulation?

2007-01-04 by Thomas Keller

OK.   I am now running into problems with interrupts in emulation.  
Can AVR Studio emulate interrupt driven programs (e.g., with timer 
interrupts)?  Either ti cannot, or I am, doing something wrongelse wrong 
in my interrupt setup. 

   I did remember to set the interrupt enable masks, bot the timer 
specific ones, and the global interrupt enable.

tom

RE: [AVR-Chat] interrupt emulation?

2007-01-04 by larry barello

You are most likely doing something wrong.  Internally generated interrupts
work for me.
Show quoted textHide quoted text
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Thomas Keller


   OK.   I am now running into problems with interrupts in emulation.  
Can AVR Studio emulate interrupt driven programs (e.g., with timer 
interrupts)?  Either ti cannot, or I am, doing something wrongelse wrong 
in my interrupt setup. 

   I did remember to set the interrupt enable masks, bot the timer 
specific ones, and the global interrupt enable.

tom

Re: [AVR-Chat] interrupt emulation?

2007-01-04 by David VanHorn

On 1/4/07, Thomas Keller <tjkeller1@alltel.net> wrote:
>
>
>   OK.   I am now running into problems with interrupts in emulation.
> Can AVR Studio emulate interrupt driven programs (e.g., with timer
> interrupts)?  Either ti cannot, or I am, doing something wrongelse wrong
> in my interrupt setup.


I'm voting for "B".  :)


  I did remember to set the interrupt enable masks, bot the timer
> specific ones, and the global interrupt enable.


You need GIE, or no ints will happen (Global interrupt enable... duh..)
Then you need the specific mask bits for the ints you want.
Then you need a populated jump table.
Then you need proper handlers.

In my belts-and-suspenders world, I start with a fully populated vector
table, and each ISR has code that disables that particular int.   Then on
the ones that I'm going to actually use, I write real handlers.   This keeps
any accidentally enabled ISR from chewing up the system.
At other times, I've sent all "unused" ints to "halt and catch fire" code,
so that they couldn't escape detection.  Sometimes it's better to crash
early and hard.


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

Re: [AVR-Chat] interrupt emulation?

2007-01-04 by Roy E. Burrage

The only problem I've had with them is the A/D ISR.  When it gets there 
you'll have to fake it out by manually entering some data.  Other than 
this they work for me too.

Design notes 24 and 46 from AVRFreaks might help you with this.


REB



larry barello wrote:
Show quoted textHide quoted text
>You are most likely doing something wrong.  Internally generated interrupts
>work for me.
>
>-----Original Message-----
>From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
>Of Thomas Keller
>
>
>   OK.   I am now running into problems with interrupts in emulation.  
>Can AVR Studio emulate interrupt driven programs (e.g., with timer 
>interrupts)?  Either ti cannot, or I am, doing something wrongelse wrong 
>in my interrupt setup. 
>
>   I did remember to set the interrupt enable masks, bot the timer 
>specific ones, and the global interrupt enable.
>
>tom
>  
>

Re: [AVR-Chat] interrupt emulation?

2007-01-04 by Jim Wagner

Tom,

When you think you SHOULD get an int, but don't, stop
emulating and check the interrupt bits in the source
register and check the various control bits that determine
what happens to the int. Each interrupt source (timer, etc)
has a register with a bit that indicates the status of that
int.

Jim


On Thu, 04 Jan 2007 14:23:37 -0600
 Thomas Keller <tjkeller1@alltel.net> wrote:
> 
>    OK.   I am now running into problems with interrupts
> in emulation.  
> Can AVR Studio emulate interrupt driven programs (e.g.,
> with timer 
> interrupts)?  Either ti cannot, or I am, doing something
> wrongelse wrong 
> in my interrupt setup. 
> 
>    I did remember to set the interrupt enable masks, bot
> the timer 
> specific ones, and the global interrupt enable.
> 
> tom

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: [AVR-Chat] interrupt emulation?

2007-01-04 by David VanHorn

On 1/4/07, Roy E. Burrage <RBurrage@bellsouth.net> wrote:
>
> The only problem I've had with them is the A/D ISR.  When it gets there
> you'll have to fake it out by manually entering some data.  Other than
> this they work for me too.


There's another point where studio could improve.

At one point, when I was beta testing the ICE-50, they managed to "twist"
the two middle bits in the ADC result.   Let me tell you that was
interesting, since it was part of a servo loop.

I had to swap them back "manually", till they fixed it in later releases.


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

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.