[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Bootloader interrupt callbacks

From: Sven Schlender
Subject: [avr-gcc-list] Bootloader interrupt callbacks
Date: Mon, 18 May 2009 11:18:39 +0200


for our project we probably have an odd problem and no ideas to resolve it.

What we already do:
- We have a bootloader on an atmegaAVR which handle all the interrupts
(timer, communication, IO) and stays in the AVR all the time.
- We have some functions in bootloader, each with a well defined address,
which can be called by the main application.
- As communication channel from bootloader to the main app we have an event
queue, which must be polled periodically by the main app.

What we want to do:
We want to add another back channel. Assuming it is possible for the main
app to register a callback function (probably with parameters) at runtime.
After registration this function is directly called from an ISR. Now, due
the project architecture, the compiler in the main app does not know, that a
callback function is part of an ISR. Is there a possibilty to say the
compiler, that some code is part of an ISR or else simply auto save and
restore used register for a given code part? Also the "sei" command must not
used by the callbacks.

Thanks for any ideas!

Best regards,

Sven Schlender

reply via email to

[Prev in Thread] Current Thread [Next in Thread]