[Tinyos-devel] Problem with serial communication on Micaz
Rodrigo Fonseca
rfonseca at cs.berkeley.edu
Wed Oct 18 12:48:20 PDT 2006
Yes, there was a typo in the wiring that prevented the UART from being
initialized.
Jonathan fixed it yesterday.
Thanks,
Rodrigo
On 10/18/06, Philip Levis <pal at cs.stanford.edu> wrote:
> On Oct 18, 2006, at 10:14 AM, Rodrigo Fonseca wrote:
>
> > Thanks Phil.
> >
> >
> >
> >> The major difference that I can see is that your code does not
> >> include MeasureClockC, which calibrates the atm128 UART clock.
> >
> > I think it does include this file. In line 1925 it has an enum that
> > comes from MeasureClockC.nc:
> >
> > # 33 "/home/m_ajnn71afimxip5myrg97438heo/opt/tinyos-2.x/tos/
> > platforms/mica/MeasureClockC.nc"
> > enum MeasureClockC$__nesc_unnamed4310 {
> >
> >
> > MeasureClockC$MAGIC = 488 / (16 / PLATFORM_MHZ)
> > };
> >
> > uint16_t MeasureClockC$cycles;
> >
> > static inline error_t MeasureClockC$Init$init(void);
> >
> > To verify, I introduced a typo in MeasureClockC.nc and surely enough
> > the compilation broke.
> >
> >> This
> >> is wired by platform/mica/PlatformC.nc; are you sure you are up to
> >> date in the entire tree?
> >
> > The tree is up to date as I checked it out fresh before compiling
> > this. The tools (compilers, etc) are the newest versions (all compiled
> > from source, as I can't install rpms in mirage).
> > As far as I know there is no other version of T1 or T2 that could be
> > polluting the compilation,
> > but I might be wrong.
> >
> > Thanks,
> > Rodrigo
>
> OK, here are the differences I see. + means working version, - means
> not working.
>
> +PLATFORM_BAUDRATE = 57600L
> -PLATFORM_BAUDRATE = 57600UL
>
> The other big difference (and I think this might be it) is that your
> version is not wiring Main.SoftwareInit to HplAtm128UartP.Uart0Init.
> That is, it's not initializing the UART.
>
> This wiring normally occurs in HplAtm128UartC. HplAtm128UartC is
> included by Atm128Uart0C. Atm128Uart0C is included by mica/
> PlatformSerialC. Can you track down your wiring and see where it's
> going wrong?
>
> Phil
>
More information about the Tinyos-devel
mailing list