不知道各位大侠有没有做过cs8900a的loopback测试,我的loopback硬件接法是:其他的线路不变,将/test拉低,还有将txd+接上rxd+,txd-接上rxd-。不知道接法上还有什么没考虑到的?然后我的程序:
CS8900_Init();
create_frame(Tx, 0, 'a', 1);//发送数据a
while(1)
{
CS8900_Send(Tx);
Uart_Printf("Send\n");
Delay(500);
*p |= 0x4200;
WritePPRegister(PP_TestCTL, *p);
vir = ReadPPRegister(PP_RER);//查询接收
if (vir & PP_RER_RxOK)
{
length = CS8900_Receive((U8*)Rx);//接收数据
Uart_Printf("%d\n", length);
Uart_Printf("%c %c\n", Rx[17], Rx[18]);
}
}
能帮忙分析一下吗?
最新人才