We are using imx6ul for our project in that we have developed our own Ethernet driver, were we are now facing an issue which is, initial few ethernet frames (ARP) are not seen in Ethernet bus. I mean we use wireshark for tracing and we don't see the Ethernet frames (ARP) in it. Later after few retries the Ethernet frames (ARP) appears. In our code we use READY bit in TxBD to ensure transmission is successful or not and we always get it cleared after transmission but still no frames appear in wire shark later after ten retry it appears.
I'm finding it difficult to know what could be the cause.
I was recommended by Mr igorpadykov to refer fec_main.c file and the linux reference manual. As the sample is developed for linux I find it difficult to follow. Can any one suggest other reference which are developed for embedded application? If not, reference for sample code for similar processors.
I found sample Ethernet code MPC577x will it be similar?
Please provide your valuable support as I need to identify the above mentioned issue and fix it at the earliest.
Thanks.
Karthik
Hi Karthik
one can try to narrow down issue to check if issue is casued by hardware or
software, try with latest nxp bsps located on below link and with nxp i.MX6UL EVK
reference board.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Igor,
Thanks for your response. I'm unable to find relevant content related to Ethernet driver in the link which you have given. Second we are using imx6ul in our ECU not in EVK. So I'm not sure how to extract Ethernet driver sample from the link which you have provided and validate Ethernet functionality to verify does the issue exist with hardware or software.
Can you let me know how would you verify Ethernet Tx and Rx is working fine? Please share if you have any sample code for Ethernet driver.
Thanks
Karthik
Hi Karthik
driver description can be found in Chapter 43 Fast Ethernet Controller (FEC) Driver attached Linux Manual.
fec_main.c\freescale\ethernet\net\drivers - linux-imx - i.MX Linux kernel
Best regards
igor
Hi Igor,
I have gone through the fec_main.c file and the reference manual. I find it bit confusing as they use queues. But still I managed to understand few of the implementations, I found fec_enet_start_xmit() is used for transmit but Im unable to understand what is tso and skb functionality. I observed that they dont use any TX confirmation to make sure transmission is successful. As per my understanding Ethernet Transmit part is implemented similar to what I see in the fec_main.c. So unable to understand what is wrong in our code. I have shared my code can you please let me know your findings.
I see problem only during first few transmission tries, later all other transmissions are successful in our case.
We use EN1588= 0 "Legacy FEC buffer descriptors and functions" with DMA.
We check READY bit for frame transmission (READY bit == 0 in TxBD) but what is the actual difference between EIR[TXF] and READY bit in TxBD?
Thanks.
Karthik