Forum Discussion
Altera_Forum
Honored Contributor
13 years agohow to access TSE control port?
Hello all, I've checked all the possible solutions to get TSE working in gigabit mode, like pll rx and all the suggestion by an440 but no way. There's another suggestion by accessing a "contro...
Altera_Forum
Honored Contributor
13 years agoIf you are using Nios II, uCOS and the NicheStack, then the Altera drivers will already have configured the PHY's chip MDIO address in the mdio_addr1 register. Then you can directly access the PHY's registers.
For that you will need to include in your c code the driver file triple_speed_ethernet_regs.h, and from that use the macro IORD_ALTERA_TSEMAC_MDIO(base, mdio, reg_num) to read a PHY register or IOWR_ALTERA_TSEMAC_MDIO(base, mdio, reg_num, data) to write it. base is the TSE IP base address (as defined in system.h, something like TSE_BASE), mdio is 1, reg_num is the register number (20 in your case) and value the value you want to write.