ENET driver freeze LPC546

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

ENET driver freeze LPC546

323 Views
lucas3
Contributor I
Hello,

I've got some troubles with ENET driver on LPC54628J512. When on a network under a VLAN, on reception of a MTU-size packet from another VLAN, We got a freeze of the device

1 - Context

The network setup is represented on the following diagram
Capture d'écran 2026-01-30 114010.png

2 - Problem

Problem occurs on reception of a MTU-Sized packet, or first fragment of fragmented packet (In our case this is a ≃2000 sized payload packet from KDEConnect client software). If the packet is sent directly on the device VLAN (192.168.16.255), there is no problem. But when the device comes from another VLAN (192.168.11.255), and then re-emmited by the Main-switch to other VLANs, it produces the freeze.

3 - Analysis

After activating LWIP_ASSERT, we got an assert in ethernetif_rx_frame_to_pbufs()
 
buffer       = rxFrame->rxBuffArray[i].buffer;    // corrupted
bufferLength = rxFrame->rxBuffArray[i].length;    // corrupted
len += bufferLength;

/* Find pbuf wrapper for the actually read byte buffer */
idx = ((rx_buffer_t *)(((uint8_t *)buffer) - ETH_PAD_SIZE)) - ethernetif->RxDataBuff;
LWIP_ASSERT("Buffer returned by ENET_GetRxFrame() doesn't match any RX buffer descriptor",
            ((idx >= 0) && (idx < ENET_RXBUFF_NUM)));

 

- idx = 1953659110
- bufferLenght = 65535 (or -1)

 

At this point, we see that data from rxFrame is very invalid data. So let analyse values in ENET_GetRxFrame(), which fill this structure.

 

Here is the result (simplified code):
/* Get the valid frame */
index = 0;
do
{
    rxDesc = &rxBdRing->rxBdBase[rxBdRing->rxGenIdx];

    /* Calculate the buffer and frame length. */
    if ((rxDesc->rdes3 & ENET_RXDESCRIP_WR_LD_MASK) != 0U)
    {
        isLastBuff      = true;
        rxFrame->totLen = (uint16_t)(rxDesc->rdes3 & ENET_RXDESCRIP_WR_PACKETLEN_MASK);

        if (rxFrame->totLen - offset > (uint16_t)rxBdRing->rxBuffSizeAlign)
        {
            buff1Len = (uint16_t)rxBdRing->rxBuffSizeAlign;
            if (handle->doubleBuffEnable)
            {
                buff2Len = rxFrame->totLen - offset - (uint16_t)rxBdRing->rxBuffSizeAlign - ENET_FCS_LEN;
            }
        }
        else
        {
            buff1Len = rxFrame->totLen - offset - ENET_FCS_LEN;
        }
        rxFrame->totLen -= ENET_FCS_LEN;
    }
    else
    {
        if (!handle->doubleBuffEnable)
        {
            buff1Len = (uint16_t)rxBdRing->rxBuffSizeAlign;
            offset += buff1Len;
        }
        else
        {
            buff1Len = (uint16_t)rxBdRing->rxBuffSizeAlign;
            buff2Len = (uint16_t)rxBdRing->rxBuffSizeAlign;
            offset += buff1Len + buff2Len;
        }
    }

    // <-- Check data here (assert on invalid buff1Len)

    /* Allocate new buffer to replace the buffer taken by application */

    if (!isDrop)
    {
        /* Get the frame data information into Rx frame structure. */

        /* Give new buffer from application to BD */
    }
    else
    {
        /* Drop frame if there's no new buffer memory */
    }
} while (!isLastBuff);
 
- buff1Len = 65534 (or -2)
- rxDesc->rdes3 & ENET_RXDESCRIP_WR_LD_MASK = 1522
- rxFrame->totLen = 1518
- offset = 1520

 

Knowing that the max buffer size is aligned(1518) = 1520, the frame length reported by the rxDescriptor is 2 over this value. This could be the cause of a data overflow...

 

4 - Faulty packet

 

The incriminated packet is a fragmented packet that is sent from another VLAN and retransmitted by the main switch.
A same packet sent directly from the device VLAN or from another VLAN doesn't result in the same effect, but when analysing the packets with wireshark, there are exactly the same from MAC layer header to payload data (except source and timestamps of course).
 
I found that when a VLAN controller send a packet, it add some additionnal informations in the IP Layer header. See https://en.wikipedia.org/wiki/IEEE_802.1Q. It represent 4 additional bytes, that could put the 1518 lenght packet to 1522.
These data are generally not displayed in wireshark, because most network interfaces process these data themselves and remove them from packet. That also the case of some more "intelligent" switches, that make the problem disapear under them.
On linux, you can do some tricks to stop removing these packets, and tadam ! here they are on wireshark

image (5).png

 

5 - Need more info about ENET driver alternative
In my program I use fsl_enet.c/.h from drivers/lpc_enet/ folder in NXP MCUXPresso SDk Core. I'm currently using v2.12.0, but I also tried with latest version on github.
I see there is another implementation for ENET, under drivers/enet/. Has I understand, it's a mor generic implementation, but it also supports more Networking features (such as VLAN) for more advanced CPUS such as iMX series.
I wasn't able to compile with the enet/ driver, because I'm missing some definitions which are only available for iMX plateforms. Is there a chance I could use this driver for LPC546 ?

lucas3_0-1769791382375.png

 

I hope someone would be able to help me handling this bug or migrating to the other variation of the driver.
Thanks,
Lucas


0 Kudos
Reply
1 Reply

252 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @lucas3 

"I wasn't able to compile with the enet/ driver, because I'm missing some definitions which are only available for iMX plateforms. Is there a chance I could use this driver for LPC546 ?"

You cannot directly switch to drivers/nets/(i.MX series universal drivers)

This driver is designed for i.MX, not LPC, and cannot be used immediately.

Base on your description.

The freeze is triggered only by VLAN‑tagged frames (~1522 bytes on the wire) coming from another VLAN. The current lpc_enet RX path assumes 1518‑byte frames;

when a 1522‑byte frame arrives, the RX length/offset computation underflows (e.g., buff1Len = -2) and corrupts the RX frame structure, which then trips the LWIP_ASSERT.

Harry_Zhang_0-1770366880148.png

 

So i think you can try to change the ENET_RXBUFF_SIZE to 1522.

BR

Harry

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2303947%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EENET%20driver%20freeze%20LPC546%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2303947%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EHello%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EI've%20got%20some%20troubles%20with%20ENET%20driver%20on%20%3CSTRONG%3ELPC54628J512%3C%2FSTRONG%3E.%20When%20on%20a%20network%20under%20a%20VLAN%2C%20on%20reception%20of%20a%20MTU-size%20packet%20from%20another%20VLAN%2C%20We%20got%20a%20freeze%20of%20the%20device%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CFONT%20size%3D%225%22%3E%3CSPAN%3E1%20-%20Context%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3EThe%20network%20setup%20is%20represented%20on%20the%20following%20diagram%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture%20d'%C3%A9cran%202026-01-30%20114010.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture%20d'%C3%A9cran%202026-01-30%20114010.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture%20d'%C3%A9cran%202026-01-30%20114010.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F375026iD39DEC19E819AE93%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Capture%20d'%C3%A9cran%202026-01-30%20114010.png%22%20alt%3D%22Capture%20d'%C3%A9cran%202026-01-30%20114010.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CFONT%20size%3D%225%22%3E%3CSPAN%3E2%20-%20Problem%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EProblem%20occurs%20on%20reception%20of%20a%20MTU-Sized%20packet%2C%20or%20first%20fragment%20of%20fragmented%20packet%20(In%20our%20case%20this%20is%20a%20%E2%89%832000%20sized%20payload%20packet%20from%20KDEConnect%20client%20software).%20If%20the%20packet%20is%20sent%20directly%20on%20the%20device%20VLAN%20(192.168.16.255)%2C%20there%20is%20no%20problem.%20But%20when%20the%20device%20comes%20from%20another%20VLAN%20(192.168.11.255)%2C%20and%20then%20re-emmited%20by%20the%20Main-switch%20to%20other%20VLANs%2C%20it%20produces%20the%20freeze.%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CFONT%20size%3D%225%22%3E%3CSPAN%3E3%20-%20Analysis%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EAfter%20activating%20LWIP_ASSERT%2C%20we%20got%20an%20assert%20in%20ethernetif_rx_frame_to_pbufs()%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Ebuffer%20%20%20%20%20%20%20%3D%20rxFrame-%26gt%3BrxBuffArray%5Bi%5D.buffer%3B%20%20%20%20%2F%2F%20corrupted%0AbufferLength%20%3D%20rxFrame-%26gt%3BrxBuffArray%5Bi%5D.length%3B%20%20%20%20%2F%2F%20corrupted%0Alen%20%2B%3D%20bufferLength%3B%0A%0A%2F*%20Find%20pbuf%20wrapper%20for%20the%20actually%20read%20byte%20buffer%20*%2F%0Aidx%20%3D%20((rx_buffer_t%20*)(((uint8_t%20*)buffer)%20-%20ETH_PAD_SIZE))%20-%20ethernetif-%26gt%3BRxDataBuff%3B%0ALWIP_ASSERT(%22Buffer%20returned%20by%20ENET_GetRxFrame()%20doesn't%20match%20any%20RX%20buffer%20descriptor%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20((idx%20%26gt%3B%3D%200)%20%26amp%3B%26amp%3B%20(idx%20%26lt%3B%20ENET_RXBUFF_NUM)))%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20idx%20%3D%201953659110%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20bufferLenght%20%3D%2065535%20(or%20-1)%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EAt%20this%20point%2C%20we%20see%20that%20data%20from%20rxFrame%20is%20very%20invalid%20data.%20So%20let%20analyse%20values%20in%20ENET_GetRxFrame()%2C%20which%20fill%20this%20structure.%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EHere%20is%20the%20result%20(simplified%20code)%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%2F*%20Get%20the%20valid%20frame%20*%2F%0Aindex%20%3D%200%3B%0Ado%0A%7B%0A%20%20%20%20rxDesc%20%3D%20%26amp%3BrxBdRing-%26gt%3BrxBdBase%5BrxBdRing-%26gt%3BrxGenIdx%5D%3B%0A%0A%20%20%20%20%2F*%20Calculate%20the%20buffer%20and%20frame%20length.%20*%2F%0A%20%20%20%20if%20((rxDesc-%26gt%3Brdes3%20%26amp%3B%20ENET_RXDESCRIP_WR_LD_MASK)%20!%3D%200U)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20isLastBuff%20%20%20%20%20%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20rxFrame-%26gt%3BtotLen%20%3D%20(uint16_t)(rxDesc-%26gt%3Brdes3%20%26amp%3B%20ENET_RXDESCRIP_WR_PACKETLEN_MASK)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(rxFrame-%26gt%3BtotLen%20-%20offset%20%26gt%3B%20(uint16_t)rxBdRing-%26gt%3BrxBuffSizeAlign)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20buff1Len%20%3D%20(uint16_t)rxBdRing-%26gt%3BrxBuffSizeAlign%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(handle-%26gt%3BdoubleBuffEnable)%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20buff2Len%20%3D%20rxFrame-%26gt%3BtotLen%20-%20offset%20-%20(uint16_t)rxBdRing-%26gt%3BrxBuffSizeAlign%20-%20ENET_FCS_LEN%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20buff1Len%20%3D%20rxFrame-%26gt%3BtotLen%20-%20offset%20-%20ENET_FCS_LEN%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20rxFrame-%26gt%3BtotLen%20-%3D%20ENET_FCS_LEN%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20(!handle-%26gt%3BdoubleBuffEnable)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20buff1Len%20%3D%20(uint16_t)rxBdRing-%26gt%3BrxBuffSizeAlign%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20offset%20%2B%3D%20buff1Len%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20buff1Len%20%3D%20(uint16_t)rxBdRing-%26gt%3BrxBuffSizeAlign%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20buff2Len%20%3D%20(uint16_t)rxBdRing-%26gt%3BrxBuffSizeAlign%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20offset%20%2B%3D%20buff1Len%20%2B%20buff2Len%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20%26lt%3B--%20Check%20data%20here%20(assert%20on%20invalid%20buff1Len)%0A%0A%20%20%20%20%2F*%20Allocate%20new%20buffer%20to%20replace%20the%20buffer%20taken%20by%20application%20*%2F%0A%0A%20%20%20%20if%20(!isDrop)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F*%20Get%20the%20frame%20data%20information%20into%20Rx%20frame%20structure.%20*%2F%0A%0A%20%20%20%20%20%20%20%20%2F*%20Give%20new%20buffer%20from%20application%20to%20BD%20*%2F%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F*%20Drop%20frame%20if%20there's%20no%20new%20buffer%20memory%20*%2F%0A%20%20%20%20%7D%0A%7D%20while%20(!isLastBuff)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20buff1Len%20%3D%2065534%20(or%20-2)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20rxDesc-%26gt%3Brdes3%20%26amp%3B%20ENET_RXDESCRIP_WR_LD_MASK%20%3D%201522%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20rxFrame-%26gt%3BtotLen%20%3D%201518%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20offset%20%3D%201520%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EKnowing%20that%20the%20max%20buffer%20size%20is%20aligned(1518)%20%3D%201520%2C%20the%20frame%20length%20reported%20by%20the%20rxDescriptor%20is%202%20over%20this%20value.%20%3CSTRONG%3EThis%20could%20be%20the%20cause%20of%20a%20data%20overflow...%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CFONT%20size%3D%225%22%3E%3CSPAN%3E4%20-%20Faulty%20packet%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EThe%20incriminated%20packet%20is%20a%20fragmented%20packet%20that%20is%20sent%20from%20another%20VLAN%20and%20retransmitted%20by%20the%20main%20switch.%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EA%20same%20packet%20sent%20directly%20from%20the%20device%20VLAN%20or%20from%20another%20VLAN%20doesn't%20result%20in%20the%20same%20effect%2C%20but%20when%20analysing%20the%20packets%20with%20wireshark%2C%20there%20are%20exactly%20the%20same%20from%20MAC%20layer%20header%20to%20payload%20data%20(except%20source%20and%20timestamps%20of%20course).%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20found%20that%20when%20a%20VLAN%20controller%20send%20a%20packet%2C%20it%20add%20some%20additionnal%20informations%20in%20the%20IP%20Layer%20header.%20See%20%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FIEEE_802.1Q%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fen.wikipedia.org%2Fwiki%2FIEEE_802.1Q%3C%2FA%3E.%20It%20represent%204%20additional%20bytes%2C%20that%20could%20put%20the%201518%20lenght%20packet%20to%201522.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EThese%20data%20are%20generally%20not%20displayed%20in%20wireshark%2C%20because%20most%20network%20interfaces%20process%20these%20data%20themselves%20and%20remove%20them%20from%20packet.%20That%20also%20the%20case%20of%20some%20more%20%22intelligent%22%20switches%2C%20that%20make%20the%20problem%20disapear%20under%20them.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EOn%20linux%2C%20you%20can%20do%20some%20tricks%20to%20stop%20removing%20these%20packets%2C%20and%20tadam%20!%20here%20they%20are%20on%20wireshark%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image%20(5).png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image%20(5).png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image%20(5).png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F375028iE66A1A7033CB1497%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22image%20(5).png%22%20alt%3D%22image%20(5).png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CFONT%20size%3D%225%22%3E%3CSPAN%3E5%20-%20Need%20more%20info%20about%20ENET%20driver%20alternative%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIn%20my%20program%20I%20use%20fsl_enet.c%2F.h%20from%20drivers%2Flpc_enet%2F%20folder%20in%20NXP%20MCUXPresso%20SDk%20Core.%20I'm%20currently%20using%20v2.12.0%2C%20but%20I%20also%20tried%20with%20latest%20version%20on%20github.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20see%20there%20is%20another%20implementation%20for%20ENET%2C%20under%20drivers%2Fenet%2F.%20Has%20I%20understand%2C%20it's%20a%20mor%20generic%20implementation%2C%20but%20it%20also%20supports%20more%20Networking%20features%20(such%20as%20VLAN)%20for%20more%20advanced%20CPUS%20such%20as%20iMX%20series.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3EI%20wasn't%20able%20to%20compile%20with%20the%20enet%2F%20driver%2C%20because%20I'm%20missing%20some%20definitions%20which%20are%20only%20available%20for%20iMX%20plateforms.%20Is%20there%20a%20chance%20I%20could%20use%20this%20driver%20for%20LPC546%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lucas3_0-1769791382375.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lucas3_0-1769791382375.png%22%20style%3D%22width%3A%20318px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lucas3_0-1769791382375.png%22%20style%3D%22width%3A%20318px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F375032i891C63678D26CF57%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lucas3_0-1769791382375.png%22%20alt%3D%22lucas3_0-1769791382375.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EI%20hope%20someone%20would%20be%20able%20to%20help%20me%20handling%20this%20bug%20or%20migrating%20to%20the%20other%20variation%20of%20the%20driver.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EThanks%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ELucas%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2313502%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20ENET%20driver%20freeze%20LPC546%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2313502%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F145498%22%20target%3D%22_blank%22%3E%40lucas3%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%22%3CSPAN%3EI%20wasn't%20able%20to%20compile%20with%20the%20enet%2F%20driver%2C%20because%20I'm%20missing%20some%20definitions%20which%20are%20only%20available%20for%20iMX%20plateforms.%20Is%20there%20a%20chance%20I%20could%20use%20this%20driver%20for%20LPC546%20%3F%3C%2FSPAN%3E%22%3C%2FP%3E%0A%3CP%3EYou%20cannot%20directly%20switch%20to%20drivers%2Fnets%2F(i.MX%20series%20universal%20drivers)%3C%2FP%3E%0A%3CP%3EThis%20driver%20is%20designed%20for%20i.MX%2C%20not%20LPC%2C%20and%20cannot%20be%20used%20immediately.%3C%2FP%3E%0A%3CP%3EBase%20on%20your%20description.%3C%2FP%3E%0A%3CP%3EThe%20freeze%20is%20triggered%20only%20by%20VLAN%E2%80%91tagged%20frames%20(~1522%20bytes%20on%20the%20wire)%20coming%20from%20another%20VLAN.%20The%20current%20lpc_enet%20RX%20path%20assumes%201518%E2%80%91byte%20frames%3B%3C%2FP%3E%0A%3CP%3Ewhen%20a%201522%E2%80%91byte%20frame%20arrives%2C%20the%20RX%20length%2Foffset%20computation%20underflows%20(e.g.%2C%20buff1Len%20%3D%20-2)%20and%20corrupts%20the%20RX%20frame%20structure%2C%20which%20then%20trips%20the%20LWIP_ASSERT.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Harry_Zhang_0-1770366880148.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Harry_Zhang_0-1770366880148.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F375822iE4F9784A288D076C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Harry_Zhang_0-1770366880148.png%22%20alt%3D%22Harry_Zhang_0-1770366880148.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ESo%20i%20think%20you%20can%20try%20to%20change%20the%26nbsp%3B%3CSPAN%3EENET_RXBUFF_SIZE%20to%201522.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBR%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EHarry%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E