[Tinyos-help] "UARTOutput" a uint32_t error

Stephen Chow zjunh2002 at gmail.com
Thu Jan 11 01:43:00 PST 2007


I use the following code for checking a uint32_t data via serial connection.
***********************************************************************************
{
   char OutputMsg[100];
    sprintf(OutputMsg, "Received Time = %d\r\n", (uint32_t) Ptime);

      UARTOutput(DBG_ERROR,"%s", &OutputMsg);
}
***********************************************************************************

But the data display on  "hyper terminal" is abnormal such as:

Received Time = 2445
Received Time = -27399
Received Time = -30925
Received Time = -7432

So I am puzzled. Any help will be appreciated.


More information about the Tinyos-help mailing list