Hello Janos,
I haved modified the files as you said. But, I still cannot read data
from uart0.
I'm using IRIS. I want to read a sensor through Uart0. Some code I write
are :
components HplAtm128UartC;
App.Uart0RxControl -> HplAtm128UartC.Uart0RxControl;
App.HplUart0 -> HplAtm128UartC.HplUart0;
In the App file, use intefaces:
interface StdControl as Uart0RxControl;
interface HplAtm128Uart as HplUart0;
in the booted function:
call Uart0RxControl.start();
call HplUart0.enableRxIntr();
I thought async event void HplUart0.rxDone(uint8_t data) will be signaled when
the data are avaible. However, the program never runs into the function.
Can you tell me what I can do to deal with this probem?
Thanks .
Haixia Li
________________________________________
From: [email protected] [[email protected]] on behalf of Janos Sallai
[[email protected]]
Sent: Thursday, May 19, 2011 9:04 AM
To: Li, Haixia
Cc: [email protected]
Subject: Re: [Tinyos-help] Help IRIS uart0 bard rate
Modify (or create a shadow copy) of chips/atm1281/HplAtm128UartC.nc in
which you change the line
ubrr0 = call Atm128Calibrate.baudrateRegister(PLATFORM_BAUDRATE);
to
ubrr0 = call Atm128Calibrate.baudrateRegister(1200);
The value returned by Atm128Calibrate.baudrateRegister(1200) should be
around 383.
Janos
On Wed, May 18, 2011 at 5:24 PM, Li, Haixia
<[email protected]> wrote:
> Hello everyone,
>
> I'm using IRIS, mib510 with Tinyos2.x. I want to using UART0 to read a
> sensor. I try to use component HplAtm128UartC. How can I change the baud
> rate on UART0?
> If I cannot use the component, do I need to use interface UartStream?
> In this interface, can I change the m_byte_time=3200 to set the baud rate to
> 1200?
>
> Any help will be appreciated.
>
> Haixia Li
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help