Part Number: MSP432E401Y
Hi,
I bought a new MSP432E401 from TI and placed it on a custom Board with a couple UART LINES and an Ethernet Post. I did not know you have to assign your own MAC Address so I used the one from the MSP432E401Y LaunchPad. ( used FlashGet) and then used FlashSet() on board with same uiUser0 and uiUser1 values). The Code Hangs in the
SysCtlPeripheralReset(SYSCTL_PERIPH_EPHY0);
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_EPHY0))
{
//
// Wait for the PHY reset to complete.
//
}
in the EMACPHYConfigSet(uint32_t ui32Base, uint32_t ui32Config) function. when I initialize LWIP. Below is the code I used to set the MAC Address. Is there something else im missing or another reason why my code is handing when resetting the internal PHY.
uint32_t ui32User0 = 7798640;
uint32_t ui32User1 = 6728988;
uint8_t pui8MACArray[8];
// FlashUserSet(ui32User0, ui32User1);
if((ui32User0 == 0xffffffff) || (ui32User1 == 0xffffffff))
{
//
// We ggggggggggggggggggggg/b /* n mmmjmjsd never get here. This is an error if the MAC address has
// not been programmed into the device. Exit the program.
// Let the user know there is no MAC address
//
//UARTprintf("No MAC programmed!\n");
while(1)
{
// TODO blink LEDs in an error pattern
}
}
// Convert the 24/24 split MAC address from NV ram into a 32/16 split MAC
// address needed to program the hardware registers, then program the MAC
// address into the Ethernet Controller registers.
// //
pui8MACArray[0] = ((ui32User0 >> 0) & 0xff);
pui8MACArray[1] = ((ui32User0 >> 8) & 0xff);
pui8MACArray[2] = ((ui32User0 >> 16) & 0xff);
pui8MACArray[3] = ((ui32User1 >> 0) & 0xff);
pui8MACArray[4] = ((ui32User1 >> 8) & 0xff);
pui8MACArray[5] = ((ui32User1 >> 16) & 0xff);
ip4_addr_t local;
ip4_addr_t netmask;
ip4_addr_t gateway;
IP4_ADDR(&local, 51, 2, 168, 192);
IP4_ADDR(&netmask, 0, 255, 255, 255);
IP4_ADDR(&gateway, 1, 2, 168, 192);
uint32_t g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_OSC_INT |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 25000000);
lwIPInit(g_ui32SysClock, macAddress, local.addr, netmask.addr, gateway.addr, IPADDR_USE_STATIC); // code hangs while excuting this line, specifily in EMACPHYConfigSet(uint32_t ui32Base, uint32_t ui32Config);