On Tue, Jul 22, 2008 at 4:05 PM, Kirak, Hong <[EMAIL PROTECTED]> wrote:

>  Hi guys,
>
>
>
> I'm making a communication system using UART0, and it seems UART overrun
> error frequently happens.
>

Also note that if you are using the MSP430, the interrupt signal handler
clears the OE bit (overrun error indicator)
prior to handing off the signal to any code wired in.  So any down stream
code won't see the overrun.

>
>
> I read some document about UART, and it says if UART interrupt is not fast
> enough, that error occurs.
>
>
>
> I'm doing nothing but a UART transmission, so I'm suspecting CPU is doing
> something else when UART is transmitting.
>

That is probably what is happening.  What speed are you running at?  If you
are at 115200 I would suggest
backing off to 57600 and if that works then the conclusion that the
interrupt service routine is too long
is probably reasonable.

>
>
> And I guess it's related to atomic section or something like that, so my
> questions are following.
>
>
>
> 1.       Is atomic section turn off entire interrupt?
>
atomic sections disable interrupts by turning off the GIE (global interrupt
enable), at least that is what happens
on the MSP430.


> 2.       If a interrupt handler is defined TOSH_SIGNAL, not
> TOSH_INTERRUPT, is it true that interrupt can not be nested? What happens
> TOSH_SIGNAL interrupt has occurred during another TOSH_SIGNAL interrupt is
> on handling?
>

The default interrupt behaviour on the MSP430 is interrupts are not nested.
I've left it that way because I don't
need any more problems to solve right now.  The little bit I looked at,
nesting interrupts on the MSP430 looks
tricky.

3.       I can see frequent error packets through UART, is it possible
> reduce error rate through UART?
>
> (Down to ideal error rate of UART with specific baud rate)
>
>
>

First is to understand the problem.  What is causing the errors?  Then
reduce the errors by fixing things.
Most likely it is the interrupt service time.

eric


> Any advice will be highly appreciated. Thanks.
>
>
>
> With Kind Regards,
>
> Kirak
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to