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.
\
Serial Problem in AVR
Moderator: tfAteba
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Serial Problem in AVR
Hi,
Thanks for reporting this problem, I will verify it and open a ticket.
Giovanni
Thanks for reporting this problem, I will verify it and open a ticket.
Giovanni
-
kimgunzung
- Posts: 9
- Joined: Thu Apr 21, 2011 9:37 am
Re: Serial Problem in AVR
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)
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)
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Serial Problem in AVR
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
Giovanni