The Arduino bootloader toggles the U2X0 bit in UCSR0A and leaves it set,
causing the baudrate to be doubled.
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4770
38d2e660-2303-0410-9eaa-
f027e97ec537
#if CONFIG_KDEBUG_PORT == 0
UBRR0H = (uint8_t)(period>>8);
UBRR0L = (uint8_t)period;
+ UCSR0A = 0; /* The Arduino Uno bootloader turns on U2X0 */
KDBG_UART0_BUS_INIT;
#else
#error Only CONFIG_KDEBUG_PORT 0 is supported for this cpu
* - Enable only the RX complete interrupt
*/
#define SER_UART0_BUS_TXINIT do { \
+ UCSR0A = 0; /* The Arduino Uno bootloader turns on U2X0 */ \
UCSR0B = BV(BIT_RXCIE0) | BV(BIT_RXEN0) | BV(BIT_TXEN0); \
} while (0)
#endif