Missed Ethernet Messages on MQX 4.1 for MCF52259

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

Missed Ethernet Messages on MQX 4.1 for MCF52259

700 Views
ericolsen
Contributor I

We are using the MQX 4.1 software framework on a project based on the MCF52259 processor. There is a problem we keep running into based on Ethernet message timing that we want to fix.

Problem: We are using a blocking UDP protocol to send messages from a program on a windows 7 machine to our embedded system (The MCF52259 processor). We have communication working fine in terms of exchanging messages over ethernet. The problem occurs when the Windows 7 Program transmits back to back ethernet messages with a short time gap between the transmission.

Details: We read the Freescale MQX RTOS RTCS User's Guide (IPv4 and IPv6) Rev. 2 , 04/2015 manual for any indication on why back to back messages seem to be dropped. In section 2.6 Changing RTCS creation parameters, there is a message that reads "Priority of RTCS task. If the priority of RTCS task is too low, RTCS might miss received packets or violate the timing specifications for a protocol." We tried making the RTCS priority higher (set to 1,2,3, and 4 from the default of 6) but it did not seem to solve our problem.

From our empirical data, it looks like if the time gap between ethernet messages is 50 ms or less, the first message is received fine, but the second message is usually dropped. In our project, there are sometimes cases where the PC program will transmit two or more ethernet messages back to back (seperated by about 8 microseconds of time gap).

Summary: How should we go about receiving back to back messages with a short time gap between message?

What is the minimum time gap between ethernet messages that MQX supports?

Is there any other settings besides the RTCS task Priority that we can modify to make sure such messages don't get dropped.

Labels (1)
0 Kudos
3 Replies

387 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Eric,

so basically sending messages with 50ms gap sometime work and some other not? However you have some times when transmission is successful with 8 us?

We have not characterized the value you are asking for but please note that the Maximum speed of MCF52259 is 80MHz and the TCP/IP stack must release the CPU at some point, so there must be a performance limit and it could be normal depending on how long it is.

Could you please add a wireshark capture?

Please aslo notice that MQX4.2 has implemented many bug fixes in RTCS and you could find a better performance using this version.


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

387 Views
estebanmaciel
Contributor I

Hi, Carlos.

I am an engineer working with Eric and we notice that around the 50ms gap some work and some do not. Around the 8us it never receives.

FreescaleWireShark.PNG

0 Kudos

387 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Esteban, Eric,

time ago I made some tests with a K64 rinning at 120MHz. In that case I was checking interrupt latency just by toggling a pin output. My findings where that MQX is able to handle 10uS interrupts while bypassing the interrupts (MQX not handling the interrupt) I was able to have 500ns interrupts.

So, if toggling a pin ouput running at 120MHz takes 10us then it wont be possible for a device running at 80MHz to send UDP packets every 8us.

However 50ms is a reasonable time. Can you send a wireshark capture (not a picture but the wireshark capture file) and a code snippet showing how are you creating the connections and sending messages?

Best regards,

Carlos

0 Kudos