調用的程序為:
HalUARTWrite(0,changeline,2);
HalUARTWrite(0,"Coord have sent:\r\n",18);
HalUARTWrite(0,theMessageData,len);
// HalLcdWriteString( "Coord send 0001", HAL_LCD_LINE_1 );
// HalLcdWriteString( "LED_All Blink", HAL_LCD_LINE_2 );
HalLcdWriteScreen("Coord send 0001","LED_All Blink");
LCD顯示成功,串口輸出為:正確信息+LCD顯示的內容(有亂碼)
void HalLcdWriteScreen( char *line1, char *line2 )
{
#if (HAL_LCD == TRUE)
HalLcdWriteString( line1, 1 );
HalLcdWriteString( line2, 2 );
#endif
}
所以跟蹤HalLcdWriteString
---->
void HalLcdWriteString ( char *str, uint8 option)
{
...
/* Send it out */
#if defined (ZTOOL_P1) || defined (ZTOOL_P2)
#if defined(SERIAL_DEBUG_SUPPORTED)
// debug_str( (uint8*)buf ); //modify by deebug
#endif //LCD_SUPPORTED
#endif //ZTOOL_P1
/* Free mem */
osal_mem_free( buf );
}
}
/* Display the string */
HalLcd_HW_WriteLine (option, str);
#endif //HAL_LCD
}
注釋掉debug_str( (uint8*)buf )立刻解決問題 。
類似問題解決方案:
http://e2e.ti.com/support/low_power_rf/f/158/p/47950/172059.aspx
http://zb4osgi.aaloa.org/pipermail/commit/2013-October/000706.html
http://zb4osgi.aaloa.org/redmine/projects/zb4osgi/repository/diff?rev=846&type=sbs
Deebug20140307
ccnu