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.

DP83620: 2AAXXLUG3 / DP83620SQ IC batch configuratation error

Part Number: DP83620

Hi Team,

we have 02ADYLUG3 / DP83620SQ  batch of DP83620 IC and that ic working properly with configuration ,

But in the 2AAXXLUG3 / DP83620SQ  batch we have some issue related to configuration setting IC not respondiong and LED2 glow with less intensity .

Init Code as per below

static void eth_init(void)
{
    // Pinmux settings
    
    pio_configure_pin_group(PIOD, 0x1FFFF,PIO_PERIPH_A);
    pmc_enable_periph_clk(ID_GMAC);
    gmac_option.uc_copy_all_frame = 1;
    gmac_option.uc_no_boardcast = 1;
    gmac_option.uc_mac_addr[0] = ETHERNET_CONF_ETHADDR0;
    gmac_option.uc_mac_addr[1] = ETHERNET_CONF_ETHADDR1;
    gmac_option.uc_mac_addr[2] = ETHERNET_CONF_ETHADDR2;
    gmac_option.uc_mac_addr[3] = ETHERNET_CONF_ETHADDR3;
    gmac_option.uc_mac_addr[4] = ETHERNET_CONF_ETHADDR4;
    if(device_role == DEVICE_ROLE_PEV){
        gmac_option.uc_mac_addr[5] = ETHERNET_CONF_ETHADDR5;
    }else{
        gmac_option.uc_mac_addr[5] = ETHERNET_CONF_ETHADDR5+2;
    }    
    gs_gmac_dev.p_hw = GMAC;
    gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option);
    gmac_set_mdc_clock(GMAC, sysclk_get_cpu_hz());
    NVIC_SetPriority(GMAC_IRQn, 6); // 6
    NVIC_EnableIRQ(GMAC_IRQn);
    
    gmac_enable_management(GMAC, 1);
    gmac_phy_read(GMAC, 0x01, 0x11, &reg_value_x); // MICR
    reg_value_x = 0x0003; // set INTEN and INT_OE
    while(GMAC_OK != gmac_phy_write(GMAC, 0x01, 0x11, reg_value_x));
    while(GMAC_OK != gmac_phy_read(GMAC, 0x01, 0x12, &reg_value_x)); // MISR
    reg_value_x = 0x0060; // LINK_INT_EN
    while(GMAC_OK != gmac_phy_write(GMAC, 0x01, 0x12, reg_value_x));

// Single Clock TX/RX MII Mode (SCMII) !!! -> important for 100BASE-FX:
    while(GMAC_OK != gmac_phy_read(GMAC, 0x01, 0x17, &reg_value_x));
    reg_value_x |= (1<<6); // TX
    reg_value_x |= (1<<7); // RX
    while(GMAC_OK != gmac_phy_write(GMAC, 0x01, 0x17, reg_value_x))
    {
    
    }

    while(GMAC_OK != gmac_phy_read(GMAC, 0x01, 0x19, &reg_value_x));
    reg_value_x &= ~((1<<5)|(1<<6));
    while(GMAC_OK != gmac_phy_write(GMAC, 0x01, 0x19, reg_value_x));
        
    while(GMAC_OK != gmac_phy_read(GMAC, 0x01, 0x1D, &reg_value_x));
    reg_value_x |= (1<<12);
    while(GMAC_OK != gmac_phy_write(GMAC, 0x01, 0x1D, reg_value_x));

    while(GMAC_OK != gmac_phy_read(GMAC, 0x01, 0x1C, &reg_value_x));
    reg_value_x |= (1<<9);
    while(GMAC_OK != gmac_phy_write(GMAC, 0x01, 0x1C, reg_value_x));
    do{

        while (gmac_phy_read(GMAC, 0x01, 0x1C, &reg_value_x) != GMAC_OK);
    }while(reg_value_x & (1<<9) );
    gmac_enable_management(GMAC, 0);   
}

in the 2AAXXLUG3 / DP83620SQ batch of IC

it is stucking in the while loop

        while (gmac_phy_read(GMAC, 0x01, 0x1C, &reg_value_x) != GMAC_OK);
    }while(reg_value_x & (1<<9) );

Please provide your suggestion

Regards,

Nikunj

  • Hi Nikunj,

    I am not sure if I understand your problem correctly.

    Everything works fine on DP83620 when 02ADYLUG3 / DP83620SQ, but when you change to 2AAXXLUG3 / DP83620SQ there is something wrong?

    It seems to me that there is a problem when you switch from 02ADYLUG3 to 2AAXXLUG3? 

    Are you able to establish link when 2AAXXLUG3 / DP83620SQ?

    --

    Thank you,

    Hillman Lin

  • Hi Hillman,

    Thank you for the replay ,

    Achualy my issue resolve , the problem is with Clock Oscillator , in Assembly they mount wrong part whcich not provide proper voltage levle (freq. is match with the recommendation ) of the Osc as recommendation by DP83620 datasheet , i replace with the proper part and now communication work .

    Thank you for the prompt replay .

    Regards,

    Nikunj