Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] USART Interrupts

2012-05-18 by STEVEN HOLDER

Hi,
 
Could you use the DMA Controller linked to the UART ?
 
Free-rtos tends to use interrupts to send the data to a port buffer, the buffer is then interrogated by the task.
 
Regards
 


________________________________
From: englsprogeny1 <englsprogeny1@yahoo.com>
To: AVR-Chat@yahoogroups.com 
Sent: Friday, 18 May 2012, 11:39
Subject: [AVR-Chat] USART Interrupts


  
I was thinking about building a simple OS (task scheduler). My thoughts are that the only interrupt that I will service will be a timer used as a 'frame counter/ sync'.

In each frame (at a specific time) I will check the UART to see if there is anything there.

Problem here is that none of the ATMegaX processors have a deep FIFO (for UART Rx). This means that if a message is sent to me when I'm not ready to receive I will lose characters.

The only fix that I can see for this is to have a low baud rate and a fast OS to where I'm checking the Rx buffer faster than a new character can be received (1 character per frame situation).

Otherwise, I will have to service the UART 'Receive Compete Interrupt'.

Maybe there is a trick buried in the datasheet that I'm not seeing.

I want to safely receive (buffer) data seen on the UART Rx wihtout servicing the 'Receive Compete Interrupt'(as if I had a FIFO (maybe 32 characters deep) 

Any thoughts?

Hopefully this makes sense to all who read it.

Many thanks,

David




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