Emulating clock ISR

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Wed Apr 4 11:59:48 UTC 2007


Hi,

rtems_clock_tick() is the interface between the periodic system timer
interrupt and the time maintained in RTEMS. For your ISR it is sufficent
to call rtems_clock_tick() to replace the standard clock driver.

Do you really want to feed a 1MHz signal as an interrupt to your system?
  This seems very high for me. (What CPU clock do you use in your
design?). Please keep in mind that RTEMS needs some kind of
"housekeeping" when you leave an ISR (e.g. to wake up tasks, that have
become ready due to a system call inside the ISR), and that RTEMS will
block ALL interrupts at certain points in the OS to ensure coherent
manipulations of data structures.

wkr,
Thomas.



Ingolf Steinbach schrieb:
> Hi,
> 
> we have the following problem:
> 
> On leon2, the RTEMS clock is based on the Interrupt
> for Timer1 which is hard-wired to priority 8. We have
> one "own" external interrupt which may not be interrupted
> by another ISR.
> 
> We can only assign interrupt priorities in the range
> 4 to 7 (i.e. less than the clock interrupt) to our
> own interrupt source.
> 
> By analyzing the interrupt mask register, we found
> that no interrupts with priority > 8 are enabled, so
> the above Clock interrupt is the only problem.
> 
> Our proposed solution is to disable timer1 (and the
> associated interrupt 8) completely and instead use
> another external(!) interrupt source with a priority
> less than our important interrupt which is then
> asserted with 1MHz.
> 
> Is this feasible (from RTEMS's point of view)?
> What should be called from the ISR for this new
> clock interrupt? Is calling rtems_clock_tick()
> sufficient?
> 
> Kind regards
> Ingolf
> --
> 
> Ingolf Steinbach
> Software Engineer
> 
> Jena-Optronik GmbH
> Prüssingstraße 41
> 07745 Jena
> Tel: +49 3641 200-216
> Fax: +49 3641 200-220
> E-Mail: ingolf.steinbach at jena-optronik.de
> http://www.jena-optronik.de
> 
> 
> President & CEO: Dietmar Ratzsch I CFO: Dr. Harald Bruhn
> Sitz der Gesellschaft: Jena  l  Handelsregister: AG Jena HRB 201.869
> 
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind, oder diese
> E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
> Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie
> die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
> 
> This message is intended to be confidential and may be privileged. If
> you are not the intended recipient, please delete this e-mail from your
> system immediately and notify us of the erroneous transmission to you.
> Any disclosure, use, copying, or distribution of this E-mail is
> prohibited.
_______________________________________________
rtems-users mailing list
rtems-users at rtems.com
http://rtems.rtems.org/mailman/listinfo/rtems-users

-- 
--------------------------------------------
embedded brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
Tel. : +49-89-18 90 80 79-2
Fax  : +49-89-18 90 80 79-9
email: Thomas.Doerfler at embedded-brains.de
PGP public key available on request




More information about the users mailing list