Li, Zhen Li wrote: > Hi > > Does anyone know how to set the baudrate in TinyOS 2.1 for MicaZ's or IRIS's > UART0? I want to set the baudrate to 1200 and I know how to do the baudrate > register's calculation but don't know where to put those values. Also, how > can I use the UART0 to read some bytes? Can anyone tell me something about > the wiring? > > Thanks!
Hi Zhen! In $TOSDIR/chips/atm128/HplAtm128UartP.nc there are functions to initialize UART0/1. The both use command call Atm128Calibrate.baudrateRegister(PLATFORM_BAUDRATE); with parameter that is defined in $TOSDIR/platforms/micaz/hardware.h (I assume IRIS uses also this definition from micaz and not from mica, because of the order of includes in $TOSDIR/platforms/iris/.platform) So you should alter this parameter only in hardware.h In $TOSDIR/chips/atm128/Atm128UartP.nc the command Init.init() should be extended with new PLATFORM_BAUDRATE you want to use and the appropriate new calculated value m_byte_time. Hope I was not wrong. Best wishes, Andrey _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help