|
From: | Tomás Glaria |
Subject: | Re: [uracoli-devel] error in UART baudrate? |
Date: | Thu, 18 Dec 2014 15:11:24 -0300 |
Hi Tomas,just had a quick look, the definition is in the filesSrc/Lib/Inc/hif.h:void hif_init(const uint32_t baudrate);
Src/Lib/Ioutil/hif_at90usb.c:void hif_init(const uint32_t baudrate)
Src/Lib/Ioutil/hif_ft245.c:void hif_init(const uint32_t baudrate)
Src/Lib/Ioutil/hif_none.c:void hif_init(const uint32_t baudrate)
Src/Lib/Ioutil/hif_uart.c:void hif_init(const uint32_t baudrate)So, let me have a look in detail tomorrow.Cheers, AxelGesendet: Donnerstag, 18. Dezember 2014 um 16:37 Uhr
Von: "Tomás Glaria" <address@hidden>
An: address@hidden
Betreff: [uracoli-devel] error in UART baudrate?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ópezIng. de EstudiosCADETECH S.A.
[Prev in Thread] | Current Thread | [Next in Thread] |