TCPIP Event timing error in MQX 4.2

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

TCPIP Event timing error in MQX 4.2

1,655 次查看
eukeniurkiaga
Contributor II

Hi,

Our application has been developed with MQX 3.8. Our application has a dhcp client and it works properly..

We are porting our application to MQX 4.2 and now the dhcp client is not renewing the lease time before the lease time finishes. For example, our dhcp server is offering a lease time =60s and the DHCPclient is renewing the IP addres very 400s.

I heve been debugging and I see this in tcpip.c (MQX 4.2)

void TCPIP_task
(
void *dummy,
void *creator
)

{

..................

.....................

timeafter = RTCS_time_get();

/* If head changed set time delta to zero to prevent immidiate event */
if (queue == TCPIP_Event_head)
{
timedelta = RTCS_timer_get_interval(timebefore, timeafter);
}
else
{
timedelta = 0;
}

timebefore = timeafter;
timedelta = TCPIP_Event_time(timedelta);

...............................

...............................

}

Comparing MQX 3.8 and MQX 4.2 I suggest doing  this change:

void TCPIP_task
(
void *dummy,
void *creator
)

{

..................

.....................

timeafter = RTCS_time_get();

/* If head changed set time delta to zero to prevent immidiate event */
if (queue == TCPIP_Event_head)
{
timedelta = RTCS_timer_get_interval(timebefore, timeafter);
timebefore = timeafter;
}
else
{
timedelta = 0;
}


timedelta = TCPIP_Event_time(timedelta);

...............................

...............................

}

I have tested and now the DHCP client works properly  like in MQX 3.8.

Is this change correct? Is there an event timing error in MQX 4.2?

Regards,

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

1,347 次查看
eukeniurkiaga
Contributor II

Hi Daniel,

Sorry, I had already applied MQX 4.2.0.2 patch, and it did not solve this problem.

I think that if  "timebefore = timeafter; " when "timedelta=0" then all the timings will be incorrect. That is my opinion but I am not totally sure.

Regards,

0 项奖励
回复

1,345 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Eukeni:

We have an MQX 4.2.0.2 patch, it fixed some RTCS bugs, including one DHCP. Please see the attached file. But I am not sure whether it related to your issue or not. I would suggest you apply  this patch.

Regards

Daniel

0 项奖励
回复