Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

GNU Timer Interrupt Example

2005-03-04 by Hugh O'Keeffe

Ashling provide a timer interrupt example which demonstrates how to handle
nested interrupts, the VIC and timers etc. If anyone is interested I can
post it to the files section. I've been falling behind on posts lately so
apologies if some one has answered this already....
 
 
The following source snippet is taken from the file...
 
/*
 
This program initiates two timers, (Timer0 and Timer1), to go off at
TIMER0_INTERVAL TIMER1_INTERVAL (#defines) intervals respectively. 
 
Both Timer0 and Timer1 interrupt handler takes half of the interrupt period
to execute. 
 
Timer0 is configured as a higher priority interrupt than Timer1. Since it
occurs more often that Timer1, it will periodically 
become a nested interrupt (interrupts Timer1). 
 
Whenever the Timer1 interrupts, it turns on P0.4 while the interrupt handler
executing.
 
Whenever the Timer0 interrupts, it turns on P0.5 while the interrupt handler
executing.
 
Whenever the Timer0 interrupts Timer1 (i.e. nested condition), it turns on
P0.6 while the interrupt handler executing.
 
*/
 
Hugh @ www.ashling.com/support/lpc2000/ 


[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.