Thought I'd briefly write this up in case someone else runs into the same issue.
There is a checkbox on the "Pin Muxing" tab for MII in HalCoGen - shown here as checked:
I always considered these buttons as shortcuts to select all pins of a module - sometimes creating conflicts which you then have to manually
resolve based on the idea that most of the peripherals can operate with a subset of their functional pins.
However, these devices also have a 'Special Pin Muxing' group - where the IOMM module registers are used to select some other device level configuration options that are not strictly speaking related to pin muxing.
One of these 'Special Muxing' options is whether to tell the Ethernet MAC to operate in MII mode or RMII mode. On the RM57L843 and TMS570LC4357 this choice is controlled by PINMUX160[24].
However - HalCoGen doesn't provide a checkbox on the "Special Pin Muxing" tab that corresponds to the choice of MII v.s. RMII. Instead - the value of PINMUX160[24] is determined by how the MII and RMII buttons are set on the normal 'Pin Muxing" tab.
So now that we have dedicated pins for Ethernet MII mode on RM57L843 and TMS570LC4357 - it's tempting to leave these boxes unchecked if you have a board that is using the new dedicated (and also default) location for MII. If you check the MII box, you then have to go back and change the location of each MII pin back to the default (instead of alternate) manually - which is a pain. You also need to make sure the change is consistent on the "Input Pin Muxing" tab.
However, if you don't check MII - HalCoGen infers that you want the MAC in RMII mode, and it will program Special Muxing PINMUX160[24] for RMII mode.
In which case you wind up with the MAC running in RMII mode, but the MII pins selected in the pinmux - recipe for a non-working project!
So - for now you -- if you are using the new default locations for Etherent on the RM57L843 or TMS570LC4357 - you should either:
a) check the MII box - but then manually put each MII signal back in it's default location in the muxing matrix.
-or-
b) add some code in a /* USER CODE */ block to put PINMUX160[24] in the correct mode (MII/RMII) after HalCoGen may have put it in an incorrect mode.
Both are a bit tricky - if you go with (a) you need to find all the pins on the HalCoGen GUI tab. Just a bit tedious / easy to miss one.
If you go with (b) you need to be aware that the PINMUX registers are 'locked' by kicker registers.
It's probably best to do something like this:
/* USER CODE BEGIN (4) */
/* Enable Pin Muxing */
pinMuxReg->KICKER0 = 0x83E70B13U;
pinMuxReg->KICKER1 = 0x95A4F1E0U;
PINMUX_ETHERNET_SELECT(MII);
/* Disable Pin Muxing */
pinMuxReg->KICKER0 = 0x00000000U;
pinMuxReg->KICKER1 = 0x00000000U;
/* USER CODE END */
Right at the end of HL_pinmux.c.
Many thanks to Charles Tsai for helping to figure out what was going wrong with the pinmuxing and how to solve the problem.