TCPIP Event timing error in MQX 4.2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TCPIP Event timing error in MQX 4.2

1,036 Views
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,

Labels (1)
0 Kudos
2 Replies

728 Views
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 Kudos

726 Views
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 Kudos