Hi All,
I am using TWRK60N512 and MQX 3.8. I am using KSZ8895MQ with MII Interface on my custom board. I know there are issues, such that TWRK60N512 cannot be used in MII mode (as some of the pins are use for JTAG) but I will be trying this on custom board.
I want to know what are the changes required in the MQX code for TWRK60N512 in order to convert from RMII to MII Interface.
Thanks,
Mohsin
The one obvious change in ...\MQX_RTOS\mqx\source\bsp\twrk60n512\init_enet.c structure:
const ENET_PARAM_STRUCT ENET_default_params[BSP_ENET_DEVICE_COUNT] = {
{
&ENET_0,
Auto_Negotiate,
ENET_OPTION_RMII | ENET_OPTION_PTP_MASTER_CLK,
BSPCFG_TX_RING_LEN, // # tx ring entries
BSPCFG_TX_RING_LEN, // # large tx packets
ENET_FRAMESIZE, // tx packet size
BSPCFG_RX_RING_LEN, // # rx ring entries
BSPCFG_RX_RING_LEN, // # normal rx packets - must be >= rx ring entries
ENET_FRAMESIZE, // ENET_FRAMESIZE, // rx packet size
BSPCFG_RX_RING_LEN, // # rx PCBs - should be >= large rx packets.
0,
0
}
};
is to remove ENET_OPTION_RMII.
Yes, at a hardware level you will lose your JTAG 'trace' function (so of course mux them to ENET, such as in init_gpio.c).
Changes to the phy interface routines in ...\MQX_RTOS\mqx\source\io\enet\phy\phy_xxx are another matter. Maybe you will luck out and your PHY will work with the 'common subset'.
--ERGII
Hi ERGII,
Thanks for your reply. What do you mean by " at a hardware level you will lose your JTAG 'trace' function (so of course mux them to ENET, such as in init_gpio.c)"
Thanks,
Mohsin