seems a significant delay in socket connection in MQX 4.0.2

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

seems a significant delay in socket connection in MQX 4.0.2

1,130 次查看
David_Wu
Contributor III

I started to use MQX 4.0.2 with CW10.2 on K60 device. I noticed a significant delay on socket connection - either TCP or UDP.

EX:

in TFTP_read:

sock = TFTP_WAIT(time_left);

 

TFTP_read is called after issuing RTCS_load_TFTP_BIN() in my program.

The call above sometimes stops for very long time (time_left is 4999). Then continue with new time_left (10000).

This did not happen on MQX 4.0.0

I wonder what is the root cause. I know there are some HW timer related changes in MQX 4.0.2. Are they tested and worked fine?

标签 (1)
标记 (4)
0 项奖励
回复
2 回复数

844 次查看
David_Wu
Contributor III

it seems I have add a _time_delay(1). This will force a sched_yield. Is there something changed related to scheduler?

_time_delay(1);

sock = TFTP_WAIT(time_left);

Now I added _time_delay(1) everywhere before I call RTCS_selectset(). The TCP/UDP connection back to normal - as in MQX 4.0.0

0 项奖励
回复

844 次查看
Martin_
NXP Employee
NXP Employee

Try to use the attached tcpip.c. Does this help ? Suspect is the way how TCPIP_task computes events.

0 项奖励
回复