how to change network interface speed from 100mbps to 10mbps in FRDMK64

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to change network interface speed from 100mbps to 10mbps in FRDMK64

1,080 Views
sudhakarp
Contributor V

hi,

     i want to know how to change 100-MBps to 10-MBps speed in FRDMk64.

i am using kds2.0 IDE. (serial to ethernet example)

thanks and regards,

sudhakar p

0 Kudos
1 Reply

377 Views
Luis_Garabo
NXP TechSupport
NXP TechSupport

Hi Sudhakar,

For MQX classic version (MQX 4.x) this is the method:

You can change this setting in the ENET_default_params[] structure which is located in the file init_enet.c. In that structure change the second element from "Auto_Negotiate" to "Half_Duplex_10M" or "Full_Duplex_10M". For example:

const ENET_PARAM_STRUCT ENET_default_params[BSP_ENET_DEVICE_COUNT] = {

    {

        &ENET_0,

        Full_Duplex_10M,

        ENET_OPTION_RMII | ENET_OPTION_PTP_MASTER_CLK

For MQX for SDK version this is the method:

Look for the function ENET_HAL_SetMac() in the file fsl_enet_hal.c and replace the value "kEnetCfgSpeed100M" with "kEnetCfgSpeed10M". For instance:

if(!macCfgPtr->rmiiCfgPtr)   

{       

  enet_config_rmii_t rmiiCfg;       

  rmiiCfg.duplex = kEnetCfgFullDuplex;       

  rmiiCfg.speed = kEnetCfgSpeed10M;      

  rmiiCfg.mode = kEnetCfgRmii;     

  rmiiCfg.isLoopEnabled = false;       

  rmiiCfg.isRxOnTxDisabled = false;       

  ENET_HAL_SetRMIIMode(base, &rmiiCfg);   

}

Hope this helps.

Have a great day,
Garabo

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------