Settings | Sign in | Sign up

The author has 11 posts.

【程序】使用数码管显示lwip网页访问的次数

Floor 11 巨大八爪鱼 4/12/17 19:34

解决办法除了关闭中断以外,还可以把程序流程改成非连续发送模式:
送数据1;
等待数据1发送完毕; // while循环
接收数据1;
送数据2;
等待数据2发送完毕; // while循环
接收数据2;

这样就可以保证一定不会出问题。


如果一定要使用连续发送模式,那么就应该使用SPI接收中断,其抢占优先级应该比数码管扫描中断更高,这样就能确保不会丢失数据,程序也不会卡死在while循环里。

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.