taskAVR C Runtime Library - Tasks: task #7546, Rework the default interrupt...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #7546: Rework the default interrupt handler

Submitter:  Joerg Wunsch <joerg_wunsch>
Submitted:  Sat 22 Dec 2007 08:34:53 PM UTC
   
 
Should Start On:  Fri 21 Dec 2007 11:00:00 PM UTC Should be Finished on:  Fri 21 Dec 2007 11:00:00 PM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Percent Complete:  0%
Open/Closed:  Open

Thu 12 May 2011 11:04:52 PM UTC, comment #1: 

Good ideas still here. Any more thoughts on moving this forward?

Eric Weddington <arcanum>
Group administrator
Sat 22 Dec 2007 08:34:53 PM UTC, original submission:  

Right now, the default interrupt handler eventually ends up
in restarting the application at address 0, so the user-
visible effect is almost similar to a reset, which has turned
out to cause minor surprises occasionally.

Other ideas have been discussed about the default ISR.  Just
using a RETI is not really better: some interrupts are not
auto-clearing so they would end up in an infinite loop, and
in all other cases a missing ISR is a programming error most
of the time which would go completely unnoticed for a long
time then.

The best idea so far came once from Peter Dannegger.  He
suggested to CALL/RCALL the default handler from within the
vector table, rather than JMP/RJMP to it.  That way, the
default handler can then pop the return address into a register
where it can be examined with a debugger (or inside the default
handler itself if it's a custom handler).  That way, programmers
will get an idea what interrupt triggered.

Finally, the default handler should best run into an infinite
loop with interrupts disabled.  abort() has been suggested a
possible implementation for that which is already there.

The difficulty of this idea is that the current scheme to
fill the vector table with JMP/RJMP instructions to locations
that are eventually inserted by the linker won't work anymore.
A new scheme would be needed where by default, a CALL/RCALL
is placed into the slot, and is then replaced by a jump
instructions for all vectors that are actually defined by
the application.

Joerg Wunsch <joerg_wunsch>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-5884.
    Corresponding source code