Baremetal Ethernet KSZ9031RN TX not working on IMX6

cancel
Showing results for 
Search instead for 
Did you mean: 

Baremetal Ethernet KSZ9031RN TX not working on IMX6

410 Views
abdelrahman_zay
Contributor I

Using the SDK for IMX6 with KSZ9031RN chip, and trying to run the Ethernet Loopback Test supported by the driver, I have received this message:

"ENET tx fail"

After receiving this message:

"ENET 7: [ FULL_DUPLEX ] [ connected ] [ 100M bps ]"

Anybody knows where the problem is?

Noting that after debugging I found that the EIR register does not change its value in the transmission loop:

for (i = 0; i < 100; i++) {
   enet_events = imx_enet_poll(dev0); 
   printf("Check: enet_events = %08x\n", enet_events);

   //EIR is the enet_events value, which gives 0 during each loop
   if (ENET_EVENT_TX & enet_events) {
      printf("enet_events = %08x\n", enet_events);
      break;
   }

   hal_delay_us(100);
}

Anyone knows why the TX fails to transmit packets? Or what could be the causes of the problem?

Thank you!

Labels (1)
0 Kudos
2 Replies

159 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Abdelrahman

I believe baremetal sdk ethernet test has problems, one can check i.MX6 registers

in uboot, also may be useful to look on clocks:

i.MX6Q ENET.REF_CLK input 

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

0 Kudos

159 Views
abdelrahman_zay
Contributor I

Hello igor,

Thank you for your response.

Could please clarify where excatly to check i.MX6 registers in uboot?

Also I have looked into clocks, and already a 125Mhz reference clock feeds the ENET_REF_CLK input from an external PHY "KSZ9031", and I have no control on the design of the SOM, it is the apalis imx6 by the way.

Noting that the Ethernet works properly on Linux, while this problem appear when working on baremetal.

Thank you in advance.

Regards,

Abdelrahman Zayed

0 Kudos