采用官方例子程序
Uint16 data[42]={40,48,51,48,48,48,48,48,48,48,55,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,51,52,48,48,65,67,41};
while(1)
{
for(i=0;i<42;i++)
{
SendChar = data[i];
scic_xmit(SendChar);
while(ScicRegs.SCIFFTX.bit.TXFFST != 0);
}
这样发送数据,一会正确,一会就出现很多问号
不知道是什么原因?
(03000000070000000000000000000000003400AC)(03000000070000000000000000000000003400AC)(03000000070000000000000000000000003400AC)(03000000070000000000000000000000003400AC)(03000000070000000000000000000000003400AC)(030000000700?00?00?00?AC?000?00?00?000?00?00?00?00?00?34?03?07?00?00?00?)(?00?0?00?00?AC?0?00?0?00?00?0?00?00?00?34?0?07?0?00?00?)?00?0?00?00?A?00?0?0?00?0?0?00?0?0?34?0?0?00?0?0?)?0?00?0?0?AC?0?00?0?0?00?0?0?0?00?3?0?0?00?0?0?)?0?00??0?A?0?0?0?0?0?0?0?0?0?3?0?0?0?0?0?)?0?0?0?0?AC?0??0?0?0?0?0?0?0??0?0?0?0?0?)?0??0?0?A?0??0?0?0??0?0??3?0?0??0?0?)?0?
下面问号部分数据就都是不对的 查不出原因在哪?
Forrest:
SCI的baud rate是多少?115200吗?芯片是28335-150MHZ吗?
设置:
SysCtrlRegs.LOSPCP.all = 0x0000; ScicRegs.SCIHBAUD =0x0000; ScicRegs.SCILBAUD =0x00A2;
如果仍旧不行,调低baud rate,再不行换台电脑,测试时序,看看是不是由于干扰造成的。