Hi,Everyone
I need your help.
I use EK-TM4C1294XL.
My program sometimes stop this while statement
/*Ethernet MAC Initialization*/
SYSCTL_RCGCEMAC_R |= 0x01; //clock enable
SYSCTL_SREMAC_R |= 0x01; //software reset
while (1 == (0x01 & SYSCTL_PREMAC_R)); //wait until reset
SYSCTL_SREMAC_R &= ~0x01; //software reset off
while (0 == (0x01 & SYSCTL_PREMAC_R)); //wait until access ready
/*Ethernet PHY Initialization*/
SYSCTL_RCGCEPHY_R |= 0x01;
SYSCTL_SREPHY_R |= 0x01;
while (1 == (0x01 & SYSCTL_PREPHY_R));
SYSCTL_SREPHY_R &= ~0x01;
while (0 == (0x01 & SYSCTL_PREPHY_R)); ← sometimes Stop this while statement
Actually I made sure attached Project file.
This program has S/W Reset after these program.
Always PC go through this while statement.
But sometimes PC stop here.
Datasheet says
============
The PREPHY register indicates whether the Ethernet PHY module is ready to be accessed by
software following a change in status of power, Run mode clocking, or reset. A power change is
initiated if the corresponding PCEPHY bit is changed from 0 to 1. A Run mode clocking change is
initiated if the corresponding RCGCEPHY bit is changed. A reset change is initiated if the
corresponding SREPHY bit is changed from 0 to 1.
============
Do you know why this stop is occur ?
Best Regards
Hiroyasu