This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
k2 的Gigabit Ethernet (GbE) Switch Subsystem文档 关于 Serializer/Deserializer (SerDes) SGMII Boot Configuration Registers的偏移地址和基地址
让看数据手册,无法找到相关的详细文档。导致D:\TI\pdk_keystone2_3_00_03_15\packages\ti\platform\evmk2h\platform_lib\src\evmc66x_phy.c的CSL_SgmiiDefSerdesSetup函数全是寄存和偏移量的操作,不知道对应哪一个寄存器。
问题1:关于 Serializer/Deserializer (SerDes) SGMII Boot Configuration Registers的偏移地址和基地址是多少?
问题2:CSL_SgmiiDefSerdesSetup下对应的寄存器文档
问题3:我需要修改sgmii的PLL输入值,其控制寄存器的偏移地址和基地址是多少?
Table 3-169是KeyStone I的寄存器,你用的K2H 是KeyStone II. KeyStone II Serdes有专门的user guide.
K2上的SGMII SerDes只支持156.25MHz和125MHz的输入时钟,相应的PLL配置也是固定的。直接调用CSL函数就可以了,不需要去研究具体的PLL寄存器.
下面是一段代码供您参考:
typedef struct { CSL_SERDES_REF_CLOCK inputRefClock; float linkSpeed_GHz; /*the max link speed of all lanes at GHz*/ /*bit 0~3 control the endable/disable of 4 lanes. 0: disable; 1: enable*/ Uint32 laneEnableMask; Uint32 internalLoopbackDisableMask; } K2_GE_SerdesConfig; char * SerdesErrorStr[]= { "SERDES no error", "SERDES error: invalid input reference clock speed!", "SERDES error: invalid link speed!" }; /*Serdes initialization for Giga bit ethernet*/ void K2_GE_Serdes_init(K2_GE_SerdesConfig * serdes_cfg, Uint32 uiBase_addr) { int i; CSL_SERDES_LINK_RATE linkSpeed; CSL_SERDES_LANE_CTRL_RATE laneRateScale; Uint32 uiResult; // Disable pll before configuring the SerDes registers CSL_EthernetSerdesShutdown(uiBase_addr); if(serdes_cfg->linkSpeed_GHz== 1.25f) { linkSpeed= CSL_SERDES_LINK_RATE_1p25G; laneRateScale = CSL_SERDES_LANE_QUARTER_RATE; //??? } else printf("Error: link speed %.3fGbps is not supported by SGMII\n",serdes_cfg->linkSpeed_GHz); uiResult= CSL_EthernetSerdesInit(uiBase_addr, serdes_cfg->inputRefClock, linkSpeed); if(uiResult) printf(" %s\n", SerdesErrorStr[uiResult]); for(i=0; i<4; i++) { if((serdes_cfg->laneEnableMask>>i)&1) { CSL_EthernetSerdesLaneConfig(uiBase_addr, serdes_cfg->inputRefClock, linkSpeed, i); } } CSL_EthernetSerdesComEnable(uiBase_addr); for(i=0; i<4; i++) { if((serdes_cfg->laneEnableMask>>i)&1) { uiResult= CSL_EthernetSerdesLaneEnable(uiBase_addr, i, (serdes_cfg->internalLoopbackDisableMask>>i)&1, laneRateScale); if(uiResult) printf(" lane %d error: invalid rate scale\n", i); } } // Enable pll via the pll_ctrl 0x0014 CSL_EthernetSerdesPllEnable(uiBase_addr); // Wait the SerDes PLL lock while(CSL_SERDES_STATUS_PLL_NOT_LOCKED==K2_SerdesPLLGetStatus(uiBase_addr)); #if 0 for(i=0; i<4; i++) { if(((serdes_cfg->laneEnableMask>>i)&1)&&((serdes_cfg->internalLoopbackDisableMask>>i)&1)) { while(CSL_SERDES_STATUS_PLL_NOT_LOCKED==K2_SerdesLaneGetStatus(uiBase_addr, i)); } } #endif } K2_GE_Serdes_init(&serdes_cfg, CSL_NETCP_SERDES_CFG_REGS);
您好,我使用的是K2e的评估板,运行的是masdk中的hello world例程,我运行后出现
Registration of the EMAC successful,waiting for link up ..
Service status:DHCPC :Enables : :000
Service status DHCPC :Enables: :000
此后,console中就再也没有任何提示,程序一直在运行,不会自动停止。相关的寄存器中是error,无法读取。
请问,我需要修改哪些参数,才能正确运行程序,传输数据?
此外,如何修改DSP的IP配置模式(DHCP 或是手动)?
谢谢,期待您的回答