Thank you for your reply.
I added "#define GPIO_STRAP_CONFIGURATION", but still I cannot read RHY register.
I want to know link is up or not by RHY register address 0x01.
I added this code to ENET.c.
void ENET_init(void)
{
static uint16_t data_val;
PCC->PCCn[PCC_ENET_INDEX] &= ~PCC_PCCn_CGC_MASK; /* Disable clock to change PCS */
PCC->PCCn[PCC_ENET_INDEX] &= ~PCC_PCCn_PCS_MASK; /* Temporarily clear PCS */
PCC->PCCn[PCC_ENET_INDEX] |= PCC_PCCn_PCS(6); /* PCS=6: Select SPLLDIV1_CLK */
PCC->PCCn[PCC_ENET_INDEX] |= PCC_PCCn_CGC_MASK; /* Enables ENET clock */
ENET_BUFFER_Init(); /* prepare description buffers */
....
/* Enable ENET */
ENET->ECR |= ENET_ECR_ETHEREN_MASK; /* MAC is enabled, and reception and transmission are possible */
ENET_GPIO_Init(); // Initialize PADs
data_val = SMI_Read(1); // added to check link is up or not
PTC->PSOR = 1<<28; /* Turn-on D56 */
}
But data_val is always 0xffff.
Am I reading the RHY register at the wrong time?
At what timing can I read the RHY register properly?
Also, I have not been able to get P2P communication to work.
No reception interrupt occurs for either Master or Slave.