ColdFire Interrupts
Corrin Meyer
Corrin.Meyer at dornerworks.com
Tue Jul 1 23:05:49 UTC 2008
According to the ColdFire datasheets, on entering of an ISR, the only
first instruction is guaranteed to run with interrupts disabled, and
therefore should modify the status register. Since on interrupt, the
processor creates an exception stack frame in which the status register
(SR) is stored, the first instruction in an ISR should load an immediate
value into SR. Either that, or use the 'STRLDSR' instruction. However,
even with a function marked with "__attribute__((interrupt))" GCC
doesn't seem to generate these instructions. I also noticed that none
of the CS3 default interrupts do this.
Is this the intended functionality? Am I correct in assuming that the
only way to write truly correct ISRs is to do so in assembly (or at
least use assembly as a wrapper before calling C code)?
Corrin J. Meyer
DornerWorks, Ltd.
Embedded Systems Engineering
T: 616.389.8336
F: 616.245.8372
E: corrin.meyer at dornerworks.com <mailto:corrin.meyer at dornerworks.com>
3445 Lake Eastbrook Blvd. SE
Grand Rapids, MI 49546
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/coldfire-gnu-discuss/attachments/20080701/1ac6887e/attachment.html>
More information about the coldfire-gnu-discuss
mailing list