MQX 4.2 RTCS TCP/IP Crash

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MQX 4.2 RTCS TCP/IP Crash

ソリューションへジャンプ
1,291件の閲覧回数
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 解決策
969件の閲覧回数
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 返信
970件の閲覧回数
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