public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Problem with DSRs
@ 2004-07-27 20:45 Miguel J. Vega
  2004-07-28 17:48 ` [ECOS] " Miguel J. Vega
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel J. Vega @ 2004-07-27 20:45 UTC (permalink / raw)
  To: ecos-discuss; +Cc: gary, bob.koninckx

Hi everyone,

I have been having trouble with with a DSR. I will describe how my set up
is so far. The serial module on our board is currently configured to
signal an interrupt. There are two things that can cause the interrupt so
I made an arbitration ISR that decides what the actual cause was and upon
making the decision, calls the appropriate ISR. This method has worked
fine so far.

I have decided to have additional code in DSRs for each ISR except the
arbitration ISR. Of course, I have the ISRs return CYG_ISR_CALL_DSR and
when I create the interrupts with cyg_interrupt_create(...), I include the
address of the DSRs.

When I run my code and have an interrupt be caused, the ISR code executes
and the DSR code executes, but then I get the following:
$T0bthread:00000002;40:1111000e;01:00c1c100;#a5

I also used GDB to step through the code, and I find out that the code
hangs at the rfi powerpc instruction.


Miguel J. Vega
FEGI C&DH Team
University of Michigan

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ECOS] Re: Problem with DSRs
  2004-07-27 20:45 [ECOS] Problem with DSRs Miguel J. Vega
@ 2004-07-28 17:48 ` Miguel J. Vega
  0 siblings, 0 replies; 2+ messages in thread
From: Miguel J. Vega @ 2004-07-28 17:48 UTC (permalink / raw)
  To: ecos-discuss

I figured out that the problem was that I was not declaring the ISR
interrupt and ISR handle variables as 'statics'. Since I declared them
inside of an initialization function, they were 'autos', so when it was
time to call a DSR for example, the DSR address part of the interrupt
objects had already been overwritten with nonrelated data. Instead of
posting the correct DSR address, a garbage address was being posted
which was entirely out of range.

Miguel J. Vega
FEGI C&DH Team
University of Michigan

On Jul 27, 2004 Miguel J. Vega wrote:

| Hi everyone,
|
| I have been having trouble with with a DSR. I will describe how my set up
| is so far. The serial module on our board is currently configured to
| signal an interrupt. There are two things that can cause the interrupt so
| I made an arbitration ISR that decides what the actual cause was and upon
| making the decision, calls the appropriate ISR. This method has worked
| fine so far.
|
| I have decided to have additional code in DSRs for each ISR except the
| arbitration ISR. Of course, I have the ISRs return CYG_ISR_CALL_DSR and
| when I create the interrupts with cyg_interrupt_create(...), I include the
| address of the DSRs.
|
| When I run my code and have an interrupt be caused, the ISR code executes
| and the DSR code executes, but then I get the following:
| $T0bthread:00000002;40:1111000e;01:00c1c100;#a5
|
| I also used GDB to step through the code, and I find out that the code
| hangs at the rfi powerpc instruction.
|
|
| Miguel J. Vega
| FEGI C&DH Team
| University of Michigan
|

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-28 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-27 20:45 [ECOS] Problem with DSRs Miguel J. Vega
2004-07-28 17:48 ` [ECOS] " Miguel J. Vega

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).