MQX 4.2 RTCS TCP/IP Crash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MQX 4.2 RTCS TCP/IP Crash

跳至解决方案
1,294 次查看
josephchen
Contributor III

Hello,

     I have found that if I suddenly disconnect the Internet while downloading files through FTP, it will just hang there. If I force to restart my FTP downloading task, TCPIP task will crash in unhandled interrupt. Has anyone encountered the similar issue?

Joseph Chen

标签 (1)
0 项奖励
回复
1 解答
972 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi Joseph,

what happens here is that if the timeout expires TCP/IP task is removed from ready queue and is sent to Timeout queue, then the scheduler is called to check for other tasks and TCP/IP task will never come back form timeout state.

You can work around this in different ways. I think a good option is to have another task that is checking the Ethernet link is up. You can do this with the following function:

ipcfg_get_link_active(BSP_DEFAULT_ENET_DEVICE);

Then if the link is broken you need to wait until time out expires and if the link is still broken you keep monitoring the link until it is up. Then you can move TCP/IP task to ready state as follows:

_task_ready(_task_get_td(_task_get_id_from_name("TCP/IP")));

I hope this helps.

Regards,

Carlos

在原帖中查看解决方案

1 回复
973 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi Joseph,

what happens here is that if the timeout expires TCP/IP task is removed from ready queue and is sent to Timeout queue, then the scheduler is called to check for other tasks and TCP/IP task will never come back form timeout state.

You can work around this in different ways. I think a good option is to have another task that is checking the Ethernet link is up. You can do this with the following function:

ipcfg_get_link_active(BSP_DEFAULT_ENET_DEVICE);

Then if the link is broken you need to wait until time out expires and if the link is still broken you keep monitoring the link until it is up. Then you can move TCP/IP task to ready state as follows:

_task_ready(_task_get_td(_task_get_id_from_name("TCP/IP")));

I hope this helps.

Regards,

Carlos