Re: Help needed with SCI interrupts (HC12)
- From: ryufrank@xxxxxxxxxxx
- Date: Thu, 28 Jun 2007 08:43:59 -0700
On Jun 28, 2:58 pm, cs_post...@xxxxxxxxxxx wrote:
Please describe what you mean by crashes. For example, does it jump
to an arbitrary address outside of the program and thus trigger the
software trap debugging interrupt?
I`m sorry for my ignorance, but how can I check this?
What is your debuger and target connection?
I`m using Serial Monitor debugger, and Monitor as Target in
Codewarrior IDE 5.7.
Sorry for not referring to these information earlier.
You need to have a non-banked memory section in your linker .prm file
(assuming codewarrior) which will not be banked switch and thus always
reliably there when an interrupt occurs, and you need to put your
interrupt service routine and anything that it might call in that
section.
If you are using the .prm from the connector app, this section is
called NON_BANKED
so you would precede your ISR and anything it uses with a
#pragma CODE_SEG NON_BANKED
and follow it with a
#pragma CODE_SEG DEFAULT
This is my case..
#pragma CODE_SEG NON_BANKED
interrupt void SCI1Interrupt (void) {
SCI1_isr_handler();
}
#pragma CODE_SEG DEFAULT
Also make sure that you are getting the address of the ISR correctly
loaded into the vector table. In the connector app, vectors.c does
that and would need to reference your ISR.
in Vectors.c
-------------------------
....
SCI1Interrupt, /* 38 Default (unused) interrupt */
.....
I believe SCI1 is supposed to be Interrupt Vector No. 21. But how do I
clarify that my specific interrupt is triggered by that?
Thank you for your support so far.
.
- Follow-Ups:
- Re: Help needed with SCI interrupts (HC12)
- From: cs_posting
- Re: Help needed with SCI interrupts (HC12)
- References:
- Help needed with SCI interrupts (HC12)
- From: ryufrank
- Re: Help needed with SCI interrupts (HC12)
- From: cs_posting
- Re: Help needed with SCI interrupts (HC12)
- From: ryufrank
- Re: Help needed with SCI interrupts (HC12)
- From: cs_posting
- Help needed with SCI interrupts (HC12)
- Prev by Date: Re: [Warning! Large binary screenshot attached.] Re: engineering graduate school question
- Next by Date: Re: BASCOM for AVR?
- Previous by thread: Re: Help needed with SCI interrupts (HC12)
- Next by thread: Re: Help needed with SCI interrupts (HC12)
- Index(es):
Relevant Pages
|