WIZnet Developer Forum

Set lan speed with 10M problem

I have download the sample code from official Library and Peripheral Example.

I want to set lan speed with 10M problem with set_link function in W7500x_miim.c but it have not update

control register and also is 100M. I read the PHYREG_CONTROL is not equal to I wrote.

I have reference wizwiki.net/wiki/lib/exe/fetch.p … erence.pdf but can not solve problem.

Any one have same problem? have any suggestion to me?

I use mdio_write to change the speed:

Also be sure the mii link is correct!! phy_id does a check if return data is not 0, but forgets to check if data == 0xFFFF
For me this solved a lot of problems.

int32_t phy_id(void)
    ...... All settings in miim.c
        printf("PHY_ID = %d , STATUS = %x\r",i,data);  //Should be someting like: 0x7869		
        if(data != 0 && data != 0xFFFF) return i; // !!!! Check if data isn't all 1's!
    printf("[PHY]:ID detect error!!\r\n");
    return 0;

Thank you Wisse reply.

I solved the problem with Wisse suggests.

Thank you!

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.