uracoli-devel
[Top][All Lists]
Advanced

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

[uracoli-devel] error in UART baudrate?


From: Tomás Glaria
Subject: [uracoli-devel] error in UART baudrate?
Date: Thu, 18 Dec 2014 12:37:14 -0300

I'm trying to use WiBo as the bootloader for my application and I'm trying to set higher baudrates than the default one (38400bps) to match the speed my devices will be using.
I've made a custom board based on a ATmega128RFA1 (pretty similar to the sparkfun board).
The thing is that whenever I try to set a baudrate bigger than 65555 (2^16, 2 bytes variable) I can't communicate with the board through the serial port.

I found that the configuration for the baudrate is in the file hif_uart.h, with the function definition "inline void HIF_UART_INIT(uint16_t baudrate){}"
Is that value correct?
What happens if I want to use 115200bps as baudrate (or 500000)?

I tried changing the declaration to "inline void HIF_UART_INIT(uint32_t baudrate){}" and then recompiled the 'board code' and THEN recompiled the host app (which is the one I'm testing right now) but no change.

So far I'm adding the code 
#define UBRR_VALUE (((F_CPU / (BAUD * 16UL))) - 1)
UBRR0H = (uint8_t)(UBRR_VALUE>>8);
UBRR0L = (uint8_t)UBRR_VALUE;
Which so far works, but I don't like calling a function which I can't find ("hif_init(BAUD);" is declared in hif.h but can't find its definition).

Ideas?
Explanations?
Someway to fix this?

I was just thinking in removing the code for the serial initialization in my particular case, but I guess that's not the solution for the whole uracoli environment.

--
Atte.
Tomás Ángel Glaría López
Ing. de Estudios
CADETECH S.A.

reply via email to

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