You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
有个提议,在eMBMasterPoll函数中swith修改如下: switch ( eEvent ) { case EV_MASTER_READY: //flag eMBMasterPoll, eg. add another state ESTABLISHED break; }
经测试可行。全部修改diff如下: diff3.txt
仓主,SystemMonitor线程在调用eMBMasterReqxxx函数前,必须要调用 rt_thread_delay吗?我在测试时,遇到的问题时,如果没有调用rt_thread_delay的话,线程就卡死了。不知道仓主有没有测试到这个问题。
仓主回答:
@ericQiang 你要等待 Modbus Poll 线程里面 MB_init 初始化成功,才能调用 modbus 相关的 API。
但目前masterPoll线程优先级最高,不存在MB_init初始化失败的情况。并且,我在初始化SystemMonitor线程时将延时设置为200.但问题依然会复现。仓主可否将你提交的工程中,SystemMonitor线程中的几个与rt_thread_delay屏蔽掉测试一下?
谢谢。
The text was updated successfully, but these errors were encountered: