public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Interrupt handling under eCOS for the arm AT91SAM7s
@ 2012-08-22  7:27 Bob Brusa
  2012-08-27 19:31 ` Michael Bergandi
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Brusa @ 2012-08-22  7:27 UTC (permalink / raw)
  To: discuss ecos

Hi,
I use an ISR that has considerable work to. Clearly, a job for a dsr, 
but I found, that using a dsr is too time consuming, so I must do 
everything in the isr (A screenshot of the ISR is available here:
https://dl.dropbox.com/u/13412634/Screenshot%20-%2021.08.jpg)

The ISR handles 4 pwm channels - all producing interrupts at a rate of 1 
ms. 3 of the channels run syncronously and hence only one of them has 
interrupts enabled. The 4th channels also triggers interrupts every ms, 
but is not in phase with the other 3 channels. The pwm interrupts have 
lowest priority of all interrupts in my system.

Upon entry in the pwm_isr, I clear flags, mask the interrupt of the 
pwm-hardware on the level of the interrupt controller (AIC) and enable 
interrupts again. This should allow higher priority interrupts to come 
through, but no pwm interrupts while the pwm_isr is busy. This according 
to my understanding. But it is obviously wrong, because the primitve 
"semaphore" I implemented tells me, that a 2nd pwm interrupt interrupts 
the first one.

One explanation I have for this is, that one of the higher priority 
interrupts clears the interrupt mask of the pwm channels - which I would 
consider a bug of eCos.

Onother explanation could be, that the system timer interrupts the 
pwm_isr and runs a task and of course, many threads in my system access 
globals of the pwm_isr, doing this within 
mask-pwm-interrupts/unmask-pwm-interrupts brackets. But it would 
surprise me that ecos runs a thread while an isr is still unfinished. 
Any comments?
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

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <CAOHvnTNSNzD0G+QMAv+B2+ZpRgwwCm5+7oQ+ArXXn-t_VJ6t=g@mail.gmail.com>]

end of thread, other threads:[~2012-08-30 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-22  7:27 [ECOS] Interrupt handling under eCOS for the arm AT91SAM7s Bob Brusa
2012-08-27 19:31 ` Michael Bergandi
2012-08-27 19:55   ` Bob Brusa
     [not found] <CAOHvnTNSNzD0G+QMAv+B2+ZpRgwwCm5+7oQ+ArXXn-t_VJ6t=g@mail.gmail.com>
2012-08-30 13:37 ` Bob Brusa

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).