On Jul 8, 2007, at 8:00 PM, Mark Kranz wrote:
Hi all,
The way that UART baudrates is configured on atm128 chips makes it
impossible to use different baud-rates on different UARTs (eg UART0
and UART1).
ubrr0 = call Atm128Calibrate.baudrateRegister(PLATFORM_BAUDRATE);
...
ubrr1 = call Atm128Calibrate.baudrateRegister(PLATFORM_BAUDRATE);
At the moment, the only way to override this is to shadow
HplAtm128UartP in our platform's implementation, change the function
arguments UART0_BAUDRATE and UART1_BAUDRATE, then #define them in the
platform's hardware header or makefile settings.
Can anyone think of a better way to do this? Does anyone else have a
genuine need for different baud-rates on different UARTs?
A better solution would be to have separate UART0 and UART1 values
defined in platform.h. I suspect the only reason they have the same
value is that not many people use UART1 so it wasn't needed.
Right now we're testing 2.0.2, but if you send a patch to -devel I
can apply it after the release. If you do, be sure to test that it
doesn't break existing platforms.
Until then, shadowing a component seems like a perfectly reasonable
way to handle the issue.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help