Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to reduce interrupt latency when using uCOS-II?
PostPosted: Tue Dec 16, 2008 11:41 am 
Offline

Joined: Mon Mar 05, 2007 10:28 pm
Posts: 18
Hello,

I am looking for ways to reduce interrupt latency when using uCOS-II. I am working with an AT91SAM7S running at 24 MHz.

The background: My application needs to respond to a received UART byte within 12.5 us, which includes some (minor) processing of the received byte and sending out an answer.

Right now, I am using the SAM7S port v. 1.84. and enable interrupt nesting by using the sequence

Code:
OS_CPU_SR_IRQ_En();
(*pfnct)(); /* Execute the ISR for the interrupting device              */
OS_CPU_SR_IRQ_Dis();


in OS_CPU_ExceptHndlr. The UART interrupt has the priority AT91C_AIC_PRIOR_HIGHEST, the other active interrupts (PIT and SPI) use lower priorities. The firmware uses three tasks, two mailboxes to communicty between ISRs and tasks, and one mutex for communication between two tasks.

On average, the latency (end of parity bit of received byte to start bit of transmitted byte) is about 12.3 us, however, the latency varies between 6.4 us and 20.4 us.

Any advice on how to reduce the maximum latency?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron