PHY changing question

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

PHY changing question

跳至解决方案
2,306 次查看
M_Grillo
Contributor III

Hello,

 

What are the steps for changing from the "phy_ksz8041.h" PHY to the “phy_dp83xxx.h” PHY in an MQX project?

 

 

MQX 3.4

CW 7.1.2

 

 

Thanks,

Mark

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,305 次查看
petr_uhlir
NXP Employee
NXP Employee

Mark,

sorry I have missed couple of things.

 

My web_hvac application was possible to compile without problems.

But if you are accessing  phy_dp83xxx_IF structure in your application you need to change also following.

 

in bsp.h change

 

//#include <phy_ksz8041.h>       // Ethernet Physical Interface

#include <phy_dp83xxx.h>       // Ethernet Physical Interface

 

in BSP postbuild batch file "bsp_twrmcf52259.bat" change 

 

rem copy /Y ..\..\..\mqx\source\io\enet\phy\phy_ksz8041.h .

copy /Y ..\..\..\mqx\source\io\enet\phy\phy_dp83xxx.h .

 


 



在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,305 次查看
petr_uhlir
NXP Employee
NXP Employee

Mark,

even if not stated, but from compiler you are using I suppose you would like to modify some MCF5225x  BSP.

 

1. In BSP library Peripheral IO Drivers -> enet-> phy replace files "phy_ksz8041.*"  by  “phy_dp83xxx.*” 

2. In enet_ini.c change included files

 

//#include "phy_ksz8041.h"

#include "phy_dp83xxx.h"

 

3. Modify ENET_IF_STRUCT ENET_0 struct to refer to phy_dp83xxx_IF

 

const ENET_IF_STRUCT ENET_0 = {     

&MCF5xxx_FEC_IF,     

&phy_dp83xxx_IF,     

MCF5225_FEC0,     

MCF5225_FEC0,     

BSP_ENET0_PHY_ADDR,     

BSP_ENET0_PHY_MII_SPEED

};

 

I am not sure if there was MQX 3.4  BSP_ENET0_PHY_MII_SPEED parameter in structure. If not, delete it.

When you recompile BSP and it should work.

0 项奖励
回复
1,305 次查看
M_Grillo
Contributor III

The BSP and all other libraries compiled fine but now the application has this link error:

 

Error   : Undefined : "phy_dp83xxx_IF"

Referenced from "ENET_0" in

 

Link failed.

 

 

Thanks,

Mark

 

0 项奖励
回复
1,306 次查看
petr_uhlir
NXP Employee
NXP Employee

Mark,

sorry I have missed couple of things.

 

My web_hvac application was possible to compile without problems.

But if you are accessing  phy_dp83xxx_IF structure in your application you need to change also following.

 

in bsp.h change

 

//#include <phy_ksz8041.h>       // Ethernet Physical Interface

#include <phy_dp83xxx.h>       // Ethernet Physical Interface

 

in BSP postbuild batch file "bsp_twrmcf52259.bat" change 

 

rem copy /Y ..\..\..\mqx\source\io\enet\phy\phy_ksz8041.h .

copy /Y ..\..\..\mqx\source\io\enet\phy\phy_dp83xxx.h .

 


 



0 项奖励
回复
1,305 次查看
M_Grillo
Contributor III

That did it!

 

Thanks! It's much appreciated.

 

Mark

0 项奖励
回复