Ethernet semi-functional using LPC54606 and FreeRTOS

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

Ethernet semi-functional using LPC54606 and FreeRTOS

686 Views
realjoebrown
Contributor I

Hello everyone,

We have been working on bringing up FreeRTOS on a LPC54606, which requires implementing a FreeRTOS+TCP NetworkInterface. Our board can successfully make a DHCP request and accept the offer, but then the board cannot tx DNS requests.

FreeRTOS will generate a valid DNS request buffer, put the buffer in DMA, and the DMA tx ring will increment, however no DNS request is seen on Wireshark.

While debugging this I tried pinging the board after the DHCP assignment. The board did not receive rx interrupts for the ping packets, but a second computer on the network was able to rx the ping packets.

I then tried making the board send a ping to my laptop after accepting the DHCP offer. This results in dropping the ping to generate an ARP request (I see a tx interrupt for this). My laptop generates an ARP response, but the board does not see a rx interrupt. I tried checking for rx data on both tx and rx interrupts, but this also did not work (no available rx data).

The DHCP server I am testing runs an ARP scan periodically. This generates 100 ARP requests on the LAN. All 100 ARP requests are processed (and dropped, as expected) by the board.

The time between request/response:

- For DHCP usually ~12ms

- ARP response from laptop ~0.1ms

- ARP scan requests ~0.5ms (however sometimes as low as ~0.024ms)

After checking the LPC546xx user manual, I thought the issue may be related to mac frame filtering. To check this I enabled promiscuous mode with `enetConfig.specialControl |= kENET_PromiscuousEnable;`. With this the board still does not get a rx interrupt for the ARP response.

Some questions:

- Is it possible for a slow tx interrupt handler to cause the board to miss a rx interrupt?

- I see there are two DMA channels, the board currently uses one DMA channel, should the board be using one channel for tx and the other channel for rx?

- I tried both `ENET_EnableInterrupts(ENET, kENET_DmaTx | kENET_DmaRx);` and `ENET_EnableInterrupts(ENET, kENET_DmaRx);`, however I always get both tx and rx interrupts. Is there more configuration necessary to disable the tx interrupt?

- Is it possible the MAC is still filtering in promiscuous mode for another reason?

Any advice is much appreciated,

Joe

Labels (2)
1 Reply

613 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Joe,

Hope you are doing well.

I'd like to better understand what is occurring in your application. It is difficult to see where the root issue is coming from. Is it possible to reproduce this on an evaluation board that we have? If so, please share a smaller project that shows this behavior so that I can test it on my end. 

Are you using the example from the SDK?

To some of your questions:

2. Yes, use each DMA channel

3. You mention in your description that you are not getting RX interrupts however in this question you say that regardless of disabling the interrupts you are getting both tx and rx interrupts. Can you please confirm the behavior that you are seeing.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

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

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos