Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | Identifying Interrupts

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Identifying Interrupts - Shayne C. Rich - Nov 12 9:09:00 2004

I have an operating system running on a 9S12DP256. I seem to be getting
spurious interrupts. I have directed all interrupts that I am not using
for my application to a sort of trap ISR. I was wondering though, is
there a way to tell which interrupt fired without writing a different
ISR for each interrupt?

I am using the ImageCraft C compiler. The operating system is one of my
own design.

Thanks,

Shayne C. Rich
Spectre Engineering Support, Inc.

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





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: Identifying Interrupts - Doron Fael - Nov 12 10:47:00 2004


If you had a full-emulator, the trace would show you which interrupt vector
took place, and the entire execution history that led to the situation.

Otherwise, I think there is no easy way. You need to write a separate ISR
for every interrupt, or it least to ones you suspect.

Hope this helps,
Doron
Nohau Corporation
HC12 In-Circuit Emulators
www.nohau.com/emul12pc.html

At 07:09 12/11/2004 -0700, you wrote:

>I have an operating system running on a 9S12DP256. I seem to be getting
>spurious interrupts. I have directed all interrupts that I am not using
>for my application to a sort of trap ISR. I was wondering though, is
>there a way to tell which interrupt fired without writing a different
>ISR for each interrupt?
>
>I am using the ImageCraft C compiler. The operating system is one of my
>own design.
>
>Thanks,
>
>Shayne C. Rich
>Spectre Engineering Support, Inc. >
>
>[Non-text portions of this message have been removed] >Yahoo! Groups Links
[Non-text portions of this message have been removed]





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Identifying Interrupts - Author Unknown - Nov 12 10:55:00 2004


In a message dated 11/12/04 9:13:40 A.M. Eastern Standard Time,
writes:

I was wondering though, is
there a way to tell which interrupt fired without writing a different
ISR for each interrupt?
=========================
I think having a handler for each interrupt is an excellent idea. Specially
for debug. Too much typing? Cut n paste. [Non-text portions of this message have been removed]




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Identifying Interrupts - Oliver Betz - Nov 12 11:17:00 2004

Doron Fael <> wrote:

> If you had a full-emulator, the trace would show you which interrupt vector
> took place, and the entire execution history that led to the situation.
>
> Otherwise, I think there is no easy way. You need to write a separate ISR
> for every interrupt, or it least to ones you suspect.

That's the way to do it, and IMHO it _is_ easy.

Since spurious interrupts can occur also when the device is shipped,
but I can't deliver a full emulator with each <g>, I have in most
devices a trap for each ISR, either logging (e.g. to EEPROM) or
displaying an error.

In assembler, that's rather compact since it consists of

ldd #vector_ID
jmp trap_handler

line pairs or a list of "jsr trap" statements (pop the return address
from the stack => you know where it came from).

Oliver
--
Oliver Betz, Muenchen




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )