Ethernet Transceiver Custom Implementation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Ethernet Transceiver Custom Implementation

960件の閲覧回数
MateoSegura413
Contributor III

Context:

Platform: S32K3**

We are implementing our own EthTrcv MCAL driver for an Ethernet Transceiver. We are also using the MCAL Hardware Drivers. (SW32K344_RTD_4_4_2_0_0_D2203)

However, there’s also a stub file for EthTrcv, under the MCAL folder of the SDK path shown below:

MateoSegura413_0-1657872344887.png

This file only has the 2 following methods in it, and they’re undefined. I’m guessing these are the Read/Write methods for the transceiver using the MDIO bus...

MateoSegura413_1-1657872375308.png

Questions:

How should this stub file be implemented?

  • If I’ve understood things correctly, the GMAC_IP driver API must be used here to call the correct MDIO_Write/MDIO_Read methods. Is this a correct statement?
  • How can I Implement this in my own source code and not in the SDK folder under the S32DS location?
  • Are these methods used internally by the MCAL Eth Driver?

 

Thanks in advance for your time and help!

タグ(4)
0 件の賞賛
返信
1 返信

949件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @MateoSegura413,

In fact, Eth_WriteMii/Eth_ReadMii are two functions which writes/reads a transceiver (physical layer driver) register, and EthTrcv_WriteMiiIndication/EthTrcv_ReadMiiIndication are two callback functions which are called by Eth_WriteMii/Eth_ReadMii to notify to EthTrcv the status of MII write/read. To implement these stubs, you can contact your local FAE to get the Eth transceiver driver package.
Regarding your questions:
1. Like below, EthTrcv_WriteMiiIndication/EthTrcv_ReadMiiIndication are just two callback functions to notify to EthTrcv the status of MII write/read, and Eth_WriteMii/Eth_ReadMii calls the correct MDIO_Write/MDIO_Read methods (throug Gmac_Ip).
2. and 3. These EthTrcv functions are stubs, so you can do whatever with these functions. Also, you can refer to the Eth Transceiver package provides by NXP. As far as I concern, you can even ignore the EthTrcv, since the Eth/Gmac_IP provides enough methods to writes/reads a transceiver (physical layer driver) register.
 
Hope it helps.
 
Best Regards,
Nam
0 件の賞賛
返信