From: Bob Brusa <bob.brusa@gmail.com>
To: ecos discuss <ecos-discuss@ecos.sourceware.org>
Subject: [ECOS] contents of the table " hal_interrupt_handlers" arm7 processor
Date: Sat, 08 Sep 2012 15:56:00 -0000 [thread overview]
Message-ID: <504B6AA5.9080908@gmail.com> (raw)
Hi,
my program generates "spurious interrupts" from time to time. This is
not surprising, because I have several threads that access the data that
are also used by my pwm_isr. And all these data accesses are embedded
between mask/unmask calls as shown below:
cyg_interrupt_mask(CYGNUM_HAL_INTERRUPT_PWMC);
....access here...
cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_PWMC);
The hardware-manual tells me that under such conditions, spurious
interrupts are likely to occure (and can thus not be avoided - except
one sacrifices data integrity - which is of course an unacceptable choice)
ECOS has a feature which should handle such "spurious interrupts"
correctly - simply write to eoi and exit - but it does not work
In vectors.S I find the sequence:
---------------------------------------------------------------------
cmp r0,#CYGNUM_HAL_INTERRUPT_NONE // spurious interrupt
bne 10f
#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS
// Acknowledge the interrupt
THUMB_CALL(r1,12,hal_interrupt_acknowledge)
#else
mov r0,v6 // register frame
THUMB_CALL(r1,12,hal_spurious_IRQ)
#endif // CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS
b spurious_IRQ
10: ldr r1,.hal_interrupt_data
ldr r1,[r1,v1,lsl #2] // handler data
ldr r2,.hal_interrupt_handlers
ldr v3,[r2,v1,lsl #2] // handler (indexed by vector #)
-----------------------------------------------------------------------
I find, that the jump bne 10f is always executed and subsequently, the
correct handler is fetched from the table hal_interrupt_handlers. But
hellas - when I get my "spurious interrupt" I find that the interrupt
source is correct (10 for pwm), the datapointer however is zero und all
entries in the hal_interrupt_handlers table are filled with the address
of the hal_default_isr.
I would expect the table hal_interrupt_handlers to be initialized during
system startup. But obviously, this assumption is wrong. Which part of
eCOS (dynamically) modifies this table and why??
Thanks for help and advice....Bob
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next reply other threads:[~2012-09-08 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-08 15:56 Bob Brusa [this message]
[not found] ` <CAOHvnTPZN=0gjfMKaVz9HXHN1u9sXA0Nn-dqEY+SJT7dJjF5aQ@mail.gmail.com>
2012-09-12 20:11 ` Michael Bergandi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=504B6AA5.9080908@gmail.com \
--to=bob.brusa@gmail.com \
--cc=ecos-discuss@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).