Page 1 of 1

Serial Problem in AVR

Posted: Thu Apr 21, 2011 9:59 am
by kimgunzung
Hi Giovanni,

I'm using ChibiOS/RT 2.2.3 with ATMega128A and AVR-GCC 4.3.3 (WinAVR 20100110).

There is error in source code in serial_llc.c in AVR port.
At line 192, SER1 should be SD1.

The USART0 is not working under the 38400bps.
There is no output at USART0 under the 38400bps.
\

Re: Serial Problem in AVR

Posted: Thu Apr 21, 2011 10:24 am
by Giovanni
Hi,

Thanks for reporting this problem, I will verify it and open a ticket.

Giovanni

Re: Serial Problem in AVR

Posted: Mon May 09, 2011 8:14 am
by kimgunzung
It is a problem of UBRR macro.
The AVR-GCC make warning "large integer implicitly truncated to unsigned type".

I modify UBRR macro such as below. This has no problem and no warning.

#define UBRR(b) (((F_CPU / b) >> 4) - 1)

Re: Serial Problem in AVR

Posted: Mon May 09, 2011 8:43 am
by Giovanni
Thanks for the fix, I didn't notice any warning, probably I am using an old version of AVR-GCC, time to upgrade it. I'll commit your change.

Giovanni