S32K344 Eth Rx Interrupt can not be triggered after a period of normal running

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

S32K344 Eth Rx Interrupt can not be triggered after a period of normal running

1,392 Views
Jobs_Ji
Contributor I

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!

youfeng_ji_0-1699608977547.png

youfeng_ji_1-1699608995261.png

 

 

0 Kudos
Reply
9 Replies

1,301 Views
Nhi_Nguyen
NXP Employee
NXP Employee

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

0 Kudos
Reply

1,217 Views
Jobs_Ji
Contributor I

Recent days,in order to exclude the interplay between TCP and UDP,just enable TCP Disable UDPto testexception still existedBy adding test code to locateafter reproducing the issuesfirstly reinitializing PhyEth transceiver),but the connection does not recoverthen reinitializing EthDriverthis time connection recovers successfullyas comparing testafter reproducing the issuesdirectly reinitializing EthDriverconnection can also recover successfully。By a variety of test and analysis,the bug scope was narrowed,I guess it points to EthDriver module

0 Kudos
Reply

1,390 Views
Jobs_Ji
Contributor I

Add information:I use code form NXP MCAL and configure it on EB tools,version information is as follows

youfeng_ji_0-1699609535531.png

 

0 Kudos
Reply

1,206 Views
Nhi_Nguyen
NXP Employee
NXP Employee

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

0 Kudos
Reply

1,200 Views
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @Jobs_Ji ,

This is status bit raised in your image:

Nhi_Nguyen_0-1705660000637.pngNhi_Nguyen_1-1705660006010.png

Can you please dump to address at value written to register

Nhi_Nguyen_2-1705660328179.png

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

 

0 Kudos
Reply

1,198 Views
Jobs_Ji
Contributor I

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。

0 Kudos
Reply

1,204 Views
Jobs_Ji
Contributor I

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

0 Kudos
Reply

1,202 Views
Jobs_Ji
Contributor I

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

0 Kudos
Reply

1,196 Views
Nhi_Nguyen
NXP Employee
NXP Employee

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

0 Kudos
Reply