AnsweredAssumed Answered

ENET rxDesc->buff1Addr wrong content

Question asked by Cristiano Rodrigues on May 10, 2019
Latest reply on May 14, 2019 by Daniel Chen

Hello!

 

I'm making a Ethernet port for FreeRtos+TCP and it kind of works, but...

 

Some times, lets say 2 in 100, ENET_GetRxFrameSize tells me that I have 64 bytes to receive, I call ENET_ReadFrame to receive the data, it confirms that there are 64 bytes to receive (with if(length == (rxDesc->control & ENET_RXDESCRIP_WR_PACKETLEN_MASK))) but the rxDesc->buff1Addr contents are not from the 64 bytes message but from the next one message (in this case 96 bytes)

 

Using wireshark to give an example:

 

the computer sends for the device

54 bytes message but the device will recive more 6 padding bytes and more 4 crc bytes
wich gives 64 bytes

0000   00 04 a3 0b 00 05 48 ba 4e 45 f5 b0 08 00 45 00   ..£...HºNEõ°..E.
0010   00 28 4a 69 40 00 40 06 db 42 0a 2a 00 01 0a 2a   .(Ji@.@.ÛB.*...*
0020   00 d0 df 62 06 82 e9 51 d1 c4 0e 58 1d 6f 50 10   .Ðßb..éQÑÄ.X.oP.
0030   01 f6 cb f7 00 00                                 .öË÷..

and a 92 bytes message more 4 bytes crc wich gives 96 bytes to read

0000   00 04 a3 0b 00 05 48 ba 4e 45 f5 b0 08 00 45 00   ..£...HºNEõ°..E.
0010   00 4e 4a 6a 40 00 40 06 db 1b 0a 2a 00 01 0a 2a   .NJj@.@.Û..*...*
0020   00 d0 df 62 06 82 e9 51 d1 c4 0e 58 1d 6f 50 18   .Ðßb..éQÑÄ.X.oP.
0030   01 f6 31 ed 00 00 01 03 00 01 00 08 00 01 02 03   .ö1í............
0040   04 05 06 07 01 01 00 08 44 55 00 00 00 00 00 00   ........DU......
0050   02 01 00 08 11 22 33 44 00 00 00 f3               ....."3D...ó

 

 

the 64 bytes message is the one that is signalled but when I try to read it, the contents that will be read are from the 96 bytes message

 

Anyone has or had a similar problem?

 

 

Device: LPC54628

SDK: 2.5.0

FSL_ENET_DRIVER_VERSION (MAKE_VERSION(2, 1, 2)) /*!< Version 2.1.2. */

FSL_PHY_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) /*!< Version 2.0.0. */

Outcomes