Just looking at the ESP 32 Page describing Ethernet. There are various functions relating to speed, is there a way I can set the speed (10Mbps) from mongoose? Currently it is auto negotiating to 100Mbps
I don’t think so. If the chip has a way to do that, and there is an IDF function to do that, you can call it from your code.
Is there any reason why you would need to do that ?
I am looking to use cheaper Mag jacks which are only rated to 10Mbps.
so there are commands ETH_STATE_SPEED, ETH_CMD_G_SPEED and eth_speed_t although I am not exactly sure how to implement them. Guess I need to learn how to call IDF functions
I’ve just quickly RTM here, and I have to correct myself, my memory failed me. The ESP32 does not have a PHY. You need an external PHY. If you need to force operation to 10Mbps you have two options:
- Use a 10base-T only PHY
- Use a PHY you can force to 10base-T, and learn how to do that.
Your chip must have an RMII or SPI interface, and I guess you’ll need a driver for SPI chips.
Hope you sell thousands because the dollar you’ll save will cost you several long development hours.
Regarding your findings,
eth_speed_t is a type definition, usually stuff ending in _t is a naming convention for typedef’d stuff.
ETH_CMD_G_SPEED will only GET you the current speed
ETH_STATE_SPEED is the state in which the driver will be when negotiating speed with the switch.
thank you, that helps a lot