simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] UART Interrupt and Timer problem


From: Klaus Rudolph
Subject: Re: [Simulavr-devel] UART Interrupt and Timer problem
Date: Wed, 11 May 2005 10:24:38 +0200 (MEST)

Hi Jakob,
> 
> The problem I am having is that the TXC vector gets called so often,
> where I think it shouldn't.

Yes, I can reproduce this. The problem was that after running
to the irq handler TXC was cleared but the state TX_AFTER_STOPBIT
could not changed anymore if TXC is allready cleared. This will result
in an extra TXC interrupt after each bit in usart which is allways
a stopbit... 
Problem is fixed, thanks for the message!

> Also have you got any idea why I would need to set the baud on the
> serialrx class to 2*baud in the device? (like the device is set up for
> 19200, yet the serialrx class needs to be
> 38400 for it to work)


Yes, that is simply a bug. If you look inside the constructors
from HWUart and HWUsart you will see that both classes register
the device in the cycle list. And HWUsart is derived from HWUart and
both constructors will register the device. The result is that
in each core step the usart will stepped twice. Problem is solved!

I actually have no time to check in the the changes to CVS but I add my
changes as diff in this mail.


Thanks for your very good error report!

Bye
   Klaus

-- 
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail

Attachment: patch_uart_bug.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]