In my project,when it is running,there are 2 data flows,one is UDP and another one is TCP,UDP and TCP have their own IP address. On UDP ,ECU as server sends a 204-byte-data in 1s period. On TCP, ECU as client sends a 1460-byte-data in 500ms period. After some time,maybe more than 10 minutes,the eclipsed time is not fixed,I found UDP is running normally,but TCP the state becomes into Reconnect,and it can also send TCP message successfully,but can not receive any TCP message,I found Rx Interrupt can not be triggered. I captured the peripheral register values and wireshark trace as follows.
So does anyone know the reason and provide me some clues to solve this problem? So Thanks!
Hi @Jobs_Ji ,
From my point of view, the problem can come from timing to send UDP and TCP. For example: at 1s, you send both UDP and TCP, did you set TCP with higher priority? Only one channel 0 used for both data flows? Status indicated that Rx buffer is unavailable and owning by application. But to receive a package, DMA needs to own it and return it to application when it completed receive, then set it again for new package. And have Rx interrupt is pending. So, my suggestion is:
- You try to change time send between UDP and TCP. Need to ensure that UPD have to be received and handled by driver, such as return buffer to application, DMA not own this buffer, then set this bit again to receive new package before sending TCP package. This means that need to ensure the interrupt processing of UDP completed before sending new TCP.
Best regards,
Nhi
Recent days,in order to exclude the interplay between TCP and UDP,just enable TCP (Disable UDP)to test,exception still existed。By adding test code to locate,after reproducing the issues,firstly reinitializing Phy(Eth transceiver),but the connection does not recover,then reinitializing EthDriver,this time connection recovers successfully;as comparing test,after reproducing the issues,directly reinitializing EthDriver,connection can also recover successfully。By a variety of test and analysis,the bug scope was narrowed,I guess it points to EthDriver module。
Add information:I use code form NXP MCAL and configure it on EB tools,version information is as follows
Hi @Jobs_Ji ,
If your data transmission speed is greater than ETH's frame processing speed, you will see same situation. There is no available Rx buffer to get coming frame. Can you try to reduce the speed to transmit frame to ETH?
Best regards,
Nhi
Hi @Jobs_Ji ,
This is status bit raised in your image:
Can you please dump to address at value written to register
Capture all of them, it will return status of frame received.
Please increase Rx buffer in configuration and reduce the speed to transmit to ETH also because your issue just exist after 10 mins with error status as above.
Best regards,
Nhi
that register value can not be believed,because I found all exceptional interrupts were not enabled before,and I also doubted why that status value is 1,actually that status is not always 1 when this issue was reproduced,and later I enabled that RBU interrupt,the issue still existed。
Data is not too much (just 200 Bytes payload to be sent and no other data needs to received except ack frame) and transmission speed is not very fast
If its possible,can we schedule a meeting and you can control my computer to see the relative register value,maybe its convenient for you to analyze
Hi @Jobs_Ji ,
Please schedule the meeting, I'm available at 3pm - 5pm Vietnam time on Monday in the next week. My account: nhi.nguyenthikieu@nxp.com.
Best regards,
Nhi