Hi Alexander, thank you for your reply.
Ethernet is always connected to a PC that supports Gigabit Ethernet.
I am using windriver vxWorks OS on the MPC8572.
Additional findings...
1. I used a spot freeze spay to find out which part was the problem.
As a result, a problem occurs in which the PHY chip is in a low temperature state.
2. I found that the above problem is different depending on the vxWorks version.
In vxWorks 6.8, the problem occurs. but, The problem does not occur in vxWorks 6.9.
So I looked for differences between vxWorks 6.8 and 6.9 about etsec.
As a result, problems have occur or not occur according to the following differences.
The following two lines have been added since upgrading from 6.8 to 6.9.
following code re-configure the etsec interface mode.
/* Set an initial interface mode.
* This may not be correct, but we have to choose one of the valid selections (byte or nibble mode).
* Choosing an invalid selection might prevent us from establishing a link.
*/
CSR_CLRBIT_4(pDev, ETSEC_MACCFG2, ETSEC_MACCFG2_IF_MODE);
CSR_SETBIT_4(pDev, ETSEC_MACCFG2, ETSEC_IFMODE_MII);
As soon as the above code is executed, the Ethernet link is up and TSECn_GTX_CLK is working.
So ..Check register values before and after added code.
logMsg("1.ETSEC_MACCFG2 : 0x%x \n", CSR_READ_4(pDev, ETSEC_MACCFG2));
CSR_CLRBIT_4(pDev, ETSEC_MACCFG2, ETSEC_MACCFG2_IF_MODE);
logMsg("2.ETSEC_MACCFG2 : 0x%x \n", CSR_READ_4(pDev, ETSEC_MACCFG2));
CSR_SETBIT_4(pDev, ETSEC_MACCFG2, ETSEC_IFMODE_MII);
logMsg("3.ETSEC_MACCFG2 : 0x%x \n", CSR_READ_4(pDev, ETSEC_MACCFG2));
result is as follows :
1.ETSEC_MACCFG2 : 0x7115
2.ETSEC_MACCFG2 : 0x7015
3.ETSEC_MACCFG2 : 0x7115
As the above results, register value is same before and after new code execution.
I do not know why link up when re-configure interface mode.
Thank you for your help.