CH579 Ethernet PHY

Hello!

For some reasons I need to disable autonegotiation and force Ethernet PHY to 10M Half-Duplex. I am tried to write a value 0 into PHY register 0, but without success. The register value still 0x1100. So the questions:

1) Is it possible to force PHY into specific mode?

2) What I need to do?

3) What is the exact procedure to write into PHY registers (it seems to be different from CH563)?


Self-reply. The correct functions to read and write PHY registers are:

void?write_mii(uint8_t?reg,?uint16_t?data)
{
????R32_ETH_MIWR?=?(data?<<?16)?|?0x0100?|?(reg?&?RB_ETH_MIREGADR_MASK);
????while?(R8_ETH_MISTAT)?{?__DSB();?};
}

uint16_t?read_mii(uint8_t?reg)
{
????R32_ETH_MIWR?=?(reg?&?RB_ETH_MIREGADR_MASK);
????return?R16_ETH_MIRD;
}



只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频