1942388_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

1942388_en-US

1942388_en-US

SJA1110 port 2 PHY to MAC

Hi,

I have an SJA1110 connected to an external microcontroller via SPI and RMII.
Managed to get the switch working vie SPI configuration upload.

It seems, that the microcontroller is able to use the RMII interface, I can read out MII_PHYSID1  and MII_PHYSID2 as 0x001BB012.

However, whatever I do, I cannot get the link status to "up". The PHY is connected via Ethernet cable to my computer.

After writing the very large manuals, it is still unclear to me if I need to configure the port 2 PHY in any special way for use with the RMII interface.

Is there some kind of power down which needs to be disabled?

Does someone know, if the general procedure is comparable to the TJA1100?

Thanks

Re: SJA1110 port 2 PHY to MAC

It works now. The RGMII Tx clock is generated by the external CPU, in the firmware was the wrong clock source selected. Setting it to a correctly configured clock source, made ethernet work for rx and tx.

Re: SJA1110 port 2 PHY to MAC

Hi Pavel,

sorry, still open. Also, I think there was some misunderstanding how the switch port 2 MAC / PHY work together with the SMI and the RGMII.
I hope I understand it right, that the switch port 2 with "phyless" use simply uses a SMI for configuration and RGMII for data transfer?

When I read out via generic PHY functions the PHYID1/PHYID2 via SMI, I get 0x001B and 0xB012. Where does this come from? I checked "phyless", so is this info the PHY interface of the integrated CPU in the SJA1110?

Meanwhile, I can receive UDP broadcast frames. Reading out the 

// Read ACU port 2 status register
ret = boardSJA1110_read_reg(0x1C4441, &cfg_stat);

tells me, that Tx of the RGMII (connected to Rx of my CPU, correct? So Rx SJA1110 -> Tx external CPU and Tx SJA1110 -> Rx external CPU) is fine and clock present.

However, it also tells that the Rx clock of the SJA1110 port 2 RGMII could not be detected, which may be the reason why I can not send and only receive frames.
Unfortunately, the board I have received does give poor access to the Rx clock line of the RGMII, so I have a hard time to check what is happening there via oszi.

As I understand, the external CPU should deliver a Tx clock signal to the Rx clock pin of the SJA1110 when RGMII is used.

Grabbing the configuration code of the SJA1110 SDK for ACU_SJA1110_cfgPinMiix_t setting the clock source from the preconfigured "auto" to other options did not help, also playing around with ACU_SJA1110_cfgPinMiixId_t delay setting did not help.

The configuration registers says always, that the RGMII of port 2 of the SJA1110 does not see a Rx clock.

Should this clock be always there or just when something is sent?

Best regards, Rainer

Re: SJA1110 port 2 PHY to MAC

Hi Rainer,

I answered to your questions by email.


Best regards,

Pavel

标记 (1)
无评分
版本历史
最后更新:
‎11-21-2025 08:59 PM
更新人: