AnsweredAssumed Answered

How to enable RT1064 ENET2?

Question asked by Tim Meyer on Dec 3, 2019
Latest reply on Jan 29, 2020 by Tim Meyer

Hi,

 

I have a custom board with a RT1064 connected to a Ethernet switch via RMII. I'm using MCUXpresso IDE v11.02 with MCU SDK v2.62 and I've modified the code to communicate to the switch over SMI instead of the PHY attached to the 1064 EVK. 

 

The issue is that I cannot see any changes/rises on the TX_EN or TX_Dx lines when. I do see a 50MHz clock and can also see data on the RX lines when I send data to the switch from another source. I also noticed that the ENET_TransmitIRQHandler() [fsl_enet.c:3007] is never called despite several calls into ENET_ActiveSend() [fsl_enet.c:885].  

 

I'm inclined to think it is related to the ENET2 clocking, but I cannot figure how to get it right so that data is sent on the ENET2 data lines. The switch may be configured to either provide a 50MHz clock or have a 50MHz input clock which I have connected GPIO_B0_15 (ENET2_REF_CLK or ENET2_TX_CLK). I can get the physical clock to be produced in either direction by changing the following:

IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET2RefClkMode, false);
IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET2TxClkOutputDir, true);

I can't help but wonder if the internal ENET peripheral isn't being clock despite the clock output on E11. Is this possible? No matter what I change these two, I never see any data or TX interrupt. 

 

Any other ideas what I am missing?

 

Pin mux

 

 

By the way, I also had changed the following line to fix a out of bounds access issue with ENET2, fsl_enet.c:264 

/*! @brief Pointers to enet handles for each instance. */
static enet_handle_t *s_ENETHandle[] = {NULL,NULL,NULL};

 

Also,

 

 

I've attached a simple variation (with .git) of the lwip_udpecho_freertos which shows the same results. I can send data from the switch and I see the RXDx and CRS lines being changed going into the 1064. I never see any change on the TX lines nor are the TX or RX interrupts ever entered. 

 

 

Any advice would be appreciated. 

Thanks,

Tim

Outcomes