This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL2-RM57L: RM57L843

Part Number: LAUNCHXL2-RM57L
Other Parts Discussed in Thread: DP83630, HALCOGEN

Hi, 

I am using Hercules RM57Lx Launchpad Development Kit and I want use Ethernet Protocol. I am new to Ethernet so I decided first by using MDIO module to read the Phy ID in DP83630, but I can't read phy id. 

I am using Halcogen to generate code and My configuration in Halcogen is 

  1. In driver enabled tap enabled the EMAC
  2. In pinmux tap selected MII Check box
  3. In GCM tap VCLK3 is 25MHZ 

 This is the code I use to read the Phy id.

int main(void)
{
/* USER CODE BEGIN (3) */

muxInit();
volatile uint32 phyID=0U;
volatile uint32 delay = 0xFFFU;
uint32 phyIdReadCount = 0xFFFFU;
hdkif_t *hdkif;
hdkif_t hdkif_data;
rxch_t *rxch;
uint32 retVal = EMAC_ERR_OK;
uint32 emacBase = 0U;

hdkif = &hdkif_data;
EMACInstConfig(hdkif);

MDIOInit(hdkif->mdio_base, MDIO_FREQ_INPUT, MDIO_FREQ_OUTPUT);

/*SAFETYMCUSW 134 S MR:12.2 <APPROVED> "LDRA Tool issue" */
while(delay != 0U)
{
/*SAFETYMCUSW 134 S MR:12.2 <APPROVED> "LDRA Tool issue" */
delay--;
}


/*SAFETYMCUSW 134 S MR:12.2 <APPROVED> "LDRA Tool issue" */
while ((phyID == 0U) && (phyIdReadCount > 0U)) {
phyID = PhyIDGet(hdkif->mdio_base,hdkif->phy_addr);
phyIdReadCount--;
}

/* USER CODE END */

return 0;
}