Hello,
I have been trying to port the Ethernet Flash bootloader demo project from the MSP432E401 Launchpad, to a custom board using MSP432E411 and external PHY via the MII bus.
I am confident that the new board is mostly working because I have ported a demo TI RTOS project to it, and had it perform DHCP setup.
Since the drivers supplied in the SDK appear to be hard coded to use the 401 internal PHY, I had to rebuild the library with a single line change in
C:\ti\simplelink_msp432e4_sdk_4_20_00_12_ext\source\ti\drivers\emac\EMACMSP432E4.c
#define EMAC_PHY_CONFIG (EMAC_PHY_TYPE_EXTERNAL_MII)
With this, the demo RTOS project sprung into life.
The Flash Bootloader project seems to link the same library, but uses local versions of the setup functions.
bl_emac.c
void EnetReconfig(uint32_t ui32Clock)
calls
LOCAL_EMACPHYConfigSet(EMAC0_BASE, (EMAC_PHY_TYPE_INTERNAL | EMAC_PHY_INT_MDIX_EN | EMAC_PHY_AN_100B_T_FULL_DUPLEX) );
instead of the library version EMACPHYConfigSet(...
I changed this in the same way as I changed the library - replaced the second argument with (EMAC_PHY_TYPE_EXTERNAL_MII)
It is a little hard to debug as the local version uses the ROM low level functions: ( e.g. ROM_EMACReset(EMAC0_BASE), ROM_SysCtlDelay(1000) )
It seems to not return from ROM_EMACReset().
Swapping this call for the non-ROM version as used by the library function - EMACReset(EMAC0_BASE); - I see that it sets the EMAC_DMABUSMOD_SWR bit in the EMAC_O_DMABUSMOD register, then waits for that bit to clear, which never happens.
I assume that the RTOS project has done some extra config step, missing from the Bootloader project, that allows the SWR action to complete after selecting external PHY.
I have tried comparing the state of all the peripheral registers (there are quite a few!) at the critical point, but I can't see any differences that look like they should affect this.
Any advice would be appreciated.
Thanks