系统(linux+msp430)
想通过linux端的控制 实现430的BSL升级
linux端发送串口控制信息,430接收到控制信息后
else if(string[0]==0xEA ) //进入BSL 升级
{
__disable_interrupt();
asm(" mov &0x1000, PC;");
}
进入BSL模式。
linux端部分代码:
usleep(4000000);
printf("send bsl sync \n");
write(uart_fd,&BSL_SYNC,1); //发送sync
while(1)
{
res = read( uart_fd, buf, 1); //等待应答
if ( res )
{
for (i=0; i<res; i++) //for all chars in string
{
In1 = buf[i];
printf("-> [0x%02x] \n", In1);
} //end of for all chars in string
} //end if res
usleep(2000);
}
可是什么都没收到。。。。帮忙分析一下,谢谢!