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.

AM2612: Enet DP83TG721RRHARQ1

Part Number: AM2612
Other Parts Discussed in Thread: SYSCONFIG, DRV8316

Tool/software:

Dear TI Support Team,

I am encountering an issue with the CPSW RGMII PHY (DP83TG721RRHARQ1) and LWIP stack under a 500MHz system clock configuration, and I would appreciate your guidance.

Problem Description:

  1. Debug Mode (Works):

    • When debugging via JTAG, the system communicates normally (Ethernet PHY link established, LWIP stack functional).

    • However, execution is noticeably slow (likely due to debugger throttling).

  2. Flash Boot Mode (Fails):

    • When booting from Flash, Ethernet communication fails (no PHY link).

    • Measured RGMII TX_CLK = 6.25MHz (expected 125MHz for Gigabit mode or 25MHz for 100Mbps).

    • Suspecting a clock configuration issue, but unsure why behavior differs between debug and flash boot.

Details:

  • PHY: DP83TG721RRHARQ1(RGMII)

  • Stack: LWIP

  • System Clock: 500MHz

Question:

  • Could this be caused by incorrect PLL, CPSW, or PHY clock initialization when booting from Flash?

  • Why does debug mode work despite the slow execution?

  • Are there known initialization timing requirements for the PHY or RGMII interface?

I have attached my SysConfig files and clock settings for reference. Any insights or debugging suggestions would be greatly appreciated.

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "AM261x_ZCZ" --part "AM2612" --package "ZCZ" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM261x@10.00.01"
 * @v2CliArgs --device "AM2612" --package "NFBGA (ZCZ)" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM261x@10.00.01"
 * @versions {"tool":"1.22.0+3893"}
 */

/**
 * Import the modules used in this configuration.
 */
const flash           = scripting.addModule("/board/flash/flash", {}, false);
const flash1          = flash.addInstance();
const ioexp           = scripting.addModule("/board/ioexp/ioexp", {}, false);
const ioexp1          = ioexp.addInstance();
const adc             = scripting.addModule("/drivers/adc/adc", {}, false);
const adc1            = adc.addInstance();
const adc2            = adc.addInstance();
const adc3            = adc.addInstance();
const edma            = scripting.addModule("/drivers/edma/edma", {}, false);
const edma1           = edma.addInstance();
const epwm            = scripting.addModule("/drivers/epwm/epwm", {}, false);
const epwm1           = epwm.addInstance();
const epwm2           = epwm.addInstance();
const gpio            = scripting.addModule("/drivers/gpio/gpio", {}, false);
const gpio1           = gpio.addInstance();
const gpio2           = gpio.addInstance();
const gpio3           = gpio.addInstance();
const gpio4           = gpio.addInstance();
const gpio5           = gpio.addInstance();
const gpio6           = gpio.addInstance();
const gpio7           = gpio.addInstance();
const gpio8           = gpio.addInstance();
const gpio9           = gpio.addInstance();
const gpio10          = gpio.addInstance();
const gpio11          = gpio.addInstance();
const gpio12          = gpio.addInstance();
const gpio13          = gpio.addInstance();
const gpio14          = gpio.addInstance();
const gpio15          = gpio.addInstance();
const gpio16          = gpio.addInstance();
const gpio17          = gpio.addInstance();
const gpio18          = gpio.addInstance();
const gpio19          = gpio.addInstance();
const gpio20          = gpio.addInstance();
const gpio21          = gpio.addInstance();
const gpio22          = gpio.addInstance();
const gpio23          = gpio.addInstance();
const gpio24          = gpio.addInstance();
const gpio25          = gpio.addInstance();
const i2c             = scripting.addModule("/drivers/i2c/i2c", {}, false);
const i2c1            = i2c.addInstance();
const i2c2            = i2c.addInstance();
const mcan            = scripting.addModule("/drivers/mcan/mcan", {}, false);
const mcan1           = mcan.addInstance();
const mcspi           = scripting.addModule("/drivers/mcspi/mcspi", {}, false);
const mcspi1          = mcspi.addInstance();
const mcspi2          = mcspi.addInstance();
const mcspi3          = mcspi.addInstance();
const mcspi4          = mcspi.addInstance();
const rti             = scripting.addModule("/drivers/rti/rti", {}, false);
const rti1            = rti.addInstance();
const clock           = scripting.addModule("/kernel/dpl/clock");
const debug_log       = scripting.addModule("/kernel/dpl/debug_log");
const dpl_cfg         = scripting.addModule("/kernel/dpl/dpl_cfg");
const mpu_armv7       = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
const mpu_armv71      = mpu_armv7.addInstance();
const mpu_armv72      = mpu_armv7.addInstance();
const mpu_armv73      = mpu_armv7.addInstance();
const mpu_armv74      = mpu_armv7.addInstance();
const mpu_armv75      = mpu_armv7.addInstance();
const mpu_armv76      = mpu_armv7.addInstance();
const mpu_armv77      = mpu_armv7.addInstance();
const default_linker  = scripting.addModule("/memory_configurator/default_linker", {}, false);
const default_linker1 = default_linker.addInstance();
const general         = scripting.addModule("/memory_configurator/general", {}, false);
const general1        = general.addInstance();
const region          = scripting.addModule("/memory_configurator/region", {}, false);
const region1         = region.addInstance();
const section         = scripting.addModule("/memory_configurator/section", {}, false);
const section1        = section.addInstance();
const section2        = section.addInstance();
const section3        = section.addInstance();
const section4        = section.addInstance();
const section5        = section.addInstance();
const section6        = section.addInstance();
const section7        = section.addInstance();
const section8        = section.addInstance();
const section9        = section.addInstance();
const section10       = section.addInstance();
const section11       = section.addInstance();
const section12       = section.addInstance();
const section13       = section.addInstance();
const section14       = section.addInstance();
const section15       = section.addInstance();
const enet_cpsw       = scripting.addModule("/networking/enet_cpsw/enet_cpsw", {}, false);
const enet_cpsw1      = enet_cpsw.addInstance();
const int_xbar        = scripting.addModule("/xbar/int_xbar/int_xbar", {}, false);
const int_xbar1       = int_xbar.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
flash1.$name                              = "CONFIG_FLASH0";
flash1.xspiWipRdCmd                       = "0x05";
flash1.device                             = "CUSTOM_FLASH";
flash1.flashBlockSize                     = 65536;
flash1.flashQeType                        = "6";
flash1.resetType                          = "0x10";
flash1.dummy_cfgReg                       = "0x00";
flash1.proto_cfgReg                       = "0x00";
flash1.strDtr_cmdRegRd                    = "00";
flash1.strDtr_cmdRegWr                    = "00";
flash1.strDtr_mask                        = "0";
flash1.deviceBusyType                     = "1";
flash1.fname                              = "Winbond";
flash1.protocol                           = "1s_1s_1s";
flash1.flashManfId                        = "0xEF";
flash1.flashDeviceId                      = "0x4018";
flash1.flashSize                          = 16777216;
flash1.cmdBlockErase4B                    = "0xD8";
flash1.cmdSectorErase4B                   = "0x20";
flash1.flashDeviceBusyTimeout             = 40000000;
flash1.flashPageProgTimeout               = 704;
flash1.addressByteSupport                 = "0x00";
flash1.fourByteEnableSeq                  = "0x00";
flash1.enable4BAddr                       = false;
flash1.peripheralDriver.$name             = "CONFIG_OSPI0";
flash1.peripheralDriver.dmaEnable         = true;
flash1.peripheralDriver.inputClkFreq      = 83333333;
flash1.peripheralDriver.baudRateDiv       = 32;
flash1.peripheralDriver.OSPI.$assign      = "OSPI0";
flash1.peripheralDriver.OSPI.CLK.$assign  = "GPIO2";
flash1.peripheralDriver.OSPI.CSn0.$assign = "GPIO0";
flash1.peripheralDriver.OSPI.DQS.$assign  = "GPIO9";
flash1.peripheralDriver.OSPI.DQS.$used    = false;
flash1.peripheralDriver.OSPI.D7.$assign   = "GPIO68";
flash1.peripheralDriver.OSPI.D7.$used     = false;
flash1.peripheralDriver.OSPI.D6.$assign   = "GPIO8";
flash1.peripheralDriver.OSPI.D6.$used     = false;
flash1.peripheralDriver.OSPI.D5.$assign   = "GPIO67";
flash1.peripheralDriver.OSPI.D5.$used     = false;
flash1.peripheralDriver.OSPI.D4.$assign   = "GPIO7";
flash1.peripheralDriver.OSPI.D4.$used     = false;
flash1.peripheralDriver.OSPI.D3.$assign   = "GPIO6";
flash1.peripheralDriver.OSPI.D2.$assign   = "GPIO5";
flash1.peripheralDriver.OSPI.D1.$assign   = "GPIO4";
flash1.peripheralDriver.OSPI.D0.$assign   = "GPIO3";
flash1.peripheralDriver.child.$name       = "drivers_ospi_v0_ospi_v0_am261x_template0";

ioexp1.$name = "CONFIG_IOEXP0";

adc1.$name              = "CONFIG_ADC0";
adc1.adcClockPrescaler  = "ADC_CLK_DIV_4_0";
adc1.soc1Channel        = "ADC_CH_ADCIN1";
adc1.soc2Channel        = "ADC_CH_ADCIN2";
adc1.soc3Channel        = "ADC_CH_ADCIN3";
adc1.soc4Channel        = "ADC_CH_ADCIN4";
adc1.soc5Channel        = "ADC_CH_ADCIN5";
adc1.soc0SampleWindow   = 20;
adc1.soc1SampleWindow   = 20;
adc1.soc3SampleWindow   = 20;
adc1.soc2SampleWindow   = 20;
adc1.soc4SampleWindow   = 20;
adc1.soc5SampleWindow   = 20;
adc1.soc0Trigger        = "ADC_TRIGGER_RTI2";
adc1.soc1Trigger        = "ADC_TRIGGER_RTI2";
adc1.soc2Trigger        = "ADC_TRIGGER_RTI2";
adc1.soc3Trigger        = "ADC_TRIGGER_RTI2";
adc1.soc4Trigger        = "ADC_TRIGGER_RTI2";
adc1.soc5Trigger        = "ADC_TRIGGER_RTI2";
adc1.enableConverter    = true;
adc1.enableInterrupt1   = true;
adc1.interruptPulseMode = "ADC_PULSE_END_OF_CONV";
adc1.ADC.$assign        = "ADC0";
adc1.ADC.AIN0.$assign   = "ADC0_AIN0";
adc1.ADC.AIN1.$assign   = "ADC0_AIN1";
adc1.ADC.AIN2.$assign   = "ADC0_AIN2";
adc1.ADC.AIN3.$assign   = "ADC0_AIN3";
adc1.ADC.AIN4.$assign   = "ADC0_AIN4";
adc1.ADC.AIN5.$assign   = "ADC0_AIN5";

adc2.$name             = "CONFIG_ADC1";
adc2.adcClockPrescaler = "ADC_CLK_DIV_2_0";
adc2.soc1Channel       = "ADC_CH_ADCIN1";
adc2.soc2Channel       = "ADC_CH_ADCIN2";
adc2.soc3Channel       = "ADC_CH_ADCIN3";
adc2.soc4Channel       = "ADC_CH_ADCIN4";
adc2.soc5Channel       = "ADC_CH_ADCIN5";
adc2.soc0SampleWindow  = 20;
adc2.soc1SampleWindow  = 20;
adc2.soc2SampleWindow  = 20;
adc2.soc3SampleWindow  = 20;
adc2.soc4SampleWindow  = 20;
adc2.soc5SampleWindow  = 20;
adc2.soc0Trigger       = "ADC_TRIGGER_RTI2";
adc2.soc1Trigger       = "ADC_TRIGGER_RTI2";
adc2.soc2Trigger       = "ADC_TRIGGER_RTI2";
adc2.soc3Trigger       = "ADC_TRIGGER_RTI2";
adc2.soc4Trigger       = "ADC_TRIGGER_RTI2";
adc2.soc5Trigger       = "ADC_TRIGGER_RTI2";
adc2.enableConverter   = true;
adc2.ADC.$assign       = "ADC1";
adc2.ADC.AIN0.$assign  = "ADC1_AIN0";
adc2.ADC.AIN1.$assign  = "ADC1_AIN1";
adc2.ADC.AIN2.$assign  = "ADC1_AIN2";
adc2.ADC.AIN3.$assign  = "ADC1_AIN3";
adc2.ADC.AIN4.$assign  = "ADC1_AIN4";
adc2.ADC.AIN5.$assign  = "ADC1_AIN5";

adc3.$name             = "CONFIG_ADC2";
adc3.adcClockPrescaler = "ADC_CLK_DIV_2_0";
adc3.soc1Channel       = "ADC_CH_ADCIN1";
adc3.soc2Channel       = "ADC_CH_ADCIN2";
adc3.soc3Channel       = "ADC_CH_ADCIN3";
adc3.soc4Channel       = "ADC_CH_ADCIN4";
adc3.soc5Channel       = "ADC_CH_ADCIN5";
adc3.soc0SampleWindow  = 20;
adc3.soc1SampleWindow  = 20;
adc3.soc2SampleWindow  = 20;
adc3.soc3SampleWindow  = 20;
adc3.soc4SampleWindow  = 20;
adc3.soc5SampleWindow  = 20;
adc3.soc0Trigger       = "ADC_TRIGGER_RTI2";
adc3.soc1Trigger       = "ADC_TRIGGER_RTI2";
adc3.soc2Trigger       = "ADC_TRIGGER_RTI2";
adc3.soc3Trigger       = "ADC_TRIGGER_RTI2";
adc3.soc4Trigger       = "ADC_TRIGGER_RTI2";
adc3.soc5Trigger       = "ADC_TRIGGER_RTI2";
adc3.enableConverter   = true;
adc3.ADC.$assign       = "ADC2";
adc3.ADC.AIN0.$assign  = "ADC2_AIN0";
adc3.ADC.AIN1.$assign  = "ADC2_AIN1";
adc3.ADC.AIN2.$assign  = "ADC2_AIN2";
adc3.ADC.AIN3.$assign  = "ADC2_AIN3";
adc3.ADC.AIN4.$assign  = "ADC2_AIN4";
adc3.ADC.AIN5.$assign  = "ADC2_AIN5";

epwm1.$name                                                      = "MCU_TMON_PWM_OUT";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_HIGH";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_LOW";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_PERIOD    = "EPWM_AQ_OUTPUT_LOW";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_HIGH";
epwm1.epwmTimebase_emulationMode                                 = "EPWM_EMULATION_FREE_RUN";
epwm1.epwmTimebase_periodLoadMode                                = "EPWM_PERIOD_DIRECT_LOAD";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_HIGH";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_PERIOD    = "EPWM_AQ_OUTPUT_LOW";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_LOW";
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_HIGH";
epwm1.EPWM.$assign                                               = "EPWM3";
epwm1.EPWM.A.$used                                               = false;
epwm1.EPWM.B.$assign                                             = "GPIO50";

epwm2.$name                                                      = "MCU_VCC_WINDOW_PWM";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_HIGH";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_PERIOD    = "EPWM_AQ_OUTPUT_LOW";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_LOW";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_HIGH";
epwm2.epwmTimebase_emulationMode                                 = "EPWM_EMULATION_FREE_RUN";
epwm2.epwmTimebase_periodLoadMode                                = "EPWM_PERIOD_DIRECT_LOAD";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_HIGH";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_PERIOD    = "EPWM_AQ_OUTPUT_LOW";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_LOW";
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_HIGH";
epwm2.EPWM.$assign                                               = "EPWM0";
epwm2.EPWM.A.$assign                                             = "GPIO43";
epwm2.EPWM.A.$used                                               = false;
epwm2.EPWM.B.$assign                                             = "GPIO44";

gpio1.$name          = "MCU_PHY_PTP_CLK_IN";
gpio1.pinDir         = "OUTPUT";
gpio1.GPIO_n.$assign = "GPIO71";

gpio2.$name          = "MCU_PHY_PTP_INT1";
gpio2.pinDir         = "OUTPUT";
gpio2.GPIO_n.$assign = "GPIO72";

gpio3.$name          = "MCU_PHY_PTP_CLK_OUT";
gpio3.GPIO_n.$assign = "GPIO73";

gpio4.$name          = "MCU_PHY_PTP_INT2";
gpio4.GPIO_n.$assign = "GPIO74";

gpio5.$name          = "MCU_PHY_CLKO_25MHZ";
gpio5.trigType       = "RISE_EDGE";
gpio5.GPIO_n.$assign = "GPIO123";

gpio6.$name          = "PL_WINDOW_EN";
gpio6.pinDir         = "OUTPUT";
gpio6.GPIO_n.$assign = "GPIO94";

gpio7.$name          = "MCU_RH_ALERT";
gpio7.GPIO_n.$assign = "GPIO95";

gpio8.$name          = "MCU_RH_RESET";
gpio8.pinDir         = "OUTPUT";
gpio8.defaultValue   = "1";
gpio8.GPIO_n.$assign = "GPIO96";

gpio9.$name          = "MCU_WDT_SET";
gpio9.pinDir         = "OUTPUT";
gpio9.GPIO_n.$assign = "GPIO92";

gpio10.$name          = "MCU_WDT_WDI";
gpio10.pinDir         = "OUTPUT";
gpio10.GPIO_n.$assign = "GPIO87";

gpio11.$name          = "PL_MCU_RSV_GPIO0";
gpio11.GPIO_n.$assign = "GPIO90";

gpio12.$name          = "PL_MCU_RSV_GPIO1";
gpio12.GPIO_n.$assign = "GPIO88";

gpio13.$name          = "PL_MCU_RSV_GPIO2";
gpio13.GPIO_n.$assign = "GPIO89";

gpio14.$name          = "PL_MCU_RSV_GPIO3";
gpio14.GPIO_n.$assign = "GPIO99";

gpio15.$name          = "MCU_DRV_nFault";
gpio15.pinDir         = "OUTPUT";
gpio15.GPIO_n.$assign = "GPIO100";

gpio16.$name          = "MCU_DRV_DRVOFF";
gpio16.pinDir         = "OUTPUT";
gpio16.GPIO_n.$assign = "GPIO101";

gpio17.$name          = "MCU_PHY_RST";
gpio17.pinDir         = "OUTPUT";
gpio17.defaultValue   = "1";
gpio17.GPIO_n.$assign = "GPIO98";

gpio18.$name          = "MCU_PHY_PSDEN";
gpio18.pinDir         = "OUTPUT";
gpio18.defaultValue   = "1";
gpio18.GPIO_n.$assign = "GPIO97";

gpio19.$name          = "MCU_PHY_INTB";
gpio19.GPIO_n.$assign = "GPIO109";

gpio20.$name          = "MCU_TMON_SW_S0";
gpio20.pinDir         = "OUTPUT";
gpio20.GPIO_n.$assign = "GPIO117";

gpio21.$name          = "MCU_TMON_SW_S1";
gpio21.pinDir         = "OUTPUT";
gpio21.GPIO_n.$assign = "GPIO118";

gpio22.$name          = "MCU_TMON_SW_S2";
gpio22.pinDir         = "OUTPUT";
gpio22.GPIO_n.$assign = "GPIO114";

gpio23.$name          = "TP72";
gpio23.pinDir         = "OUTPUT";
gpio23.GPIO_n.$assign = "GPIO125";

gpio24.$name          = "TP73";
gpio24.pinDir         = "OUTPUT";
gpio24.GPIO_n.$assign = "GPIO120";

gpio25.$name          = "TP74";
gpio25.pinDir         = "OUTPUT";
gpio25.GPIO_n.$assign = "GPIO119";

ioexp1.peripheralDriver = i2c1;
i2c1.$name              = "I2C0_RH";
i2c1.I2C.$assign        = "I2C0";
i2c1.I2C.SCL.$assign    = "GPIO135";
i2c1.I2C.SDA.$assign    = "GPIO134";
i2c1.I2C_child.$name    = "drivers_i2c_v1_i2c_v1_template0";

i2c2.$name           = "I2C2_FCT";
i2c2.I2C.$assign     = "I2C2";
i2c2.I2C.SCL.$assign = "GPIO133";
i2c2.I2C.SDA.$assign = "GPIO132";
i2c2.I2C_child.$name = "drivers_i2c_v1_i2c_v1_template1";

mcan1.$name                = "CONFIG_MCAN0";
mcan1.sdkInfra             = "HLD";
mcan1.enableLoopback       = false;
mcan1.operMode             = "POLLED";
mcan1.tdcEnable            = true;
mcan1.additionalCoreConfig = true;
mcan1.nomBrp               = 1;
mcan1.nomPropSeg           = 0;
mcan1.nomPseg1             = 62;
mcan1.nomPseg2             = 15;
mcan1.dataPropSeg          = 0;
mcan1.dataPseg1            = 14;
mcan1.dataPseg2            = 3;
mcan1.darEnable            = true;
mcan1.wkupReqEnable        = true;
mcan1.autoWkupEnable       = true;
mcan1.MCAN.$assign         = "MCAN0";
mcan1.MCAN.RX.$assign      = "GPIO7";
mcan1.MCAN.TX.$assign      = "GPIO8";

const mcan_v1_template_hld  = scripting.addModule("/drivers/mcan/v1/mcan_v1_template_hld", {}, false);
const mcan_v1_template_hld1 = mcan_v1_template_hld.addInstance({}, false);
mcan_v1_template_hld1.$name = "drivers_mcan_v1_mcan_v1_template_hld0";
mcan1.child                 = mcan_v1_template_hld1;

mcspi1.$name                       = "MCSPI0_RSV";
mcspi1.inputSelect                 = "0";
mcspi1.dpe0                        = "DISABLE";
mcspi1.dpe1                        = "ENABLE";
mcspi1.SPI.$assign                 = "SPI0";
mcspi1.SPI.CLK.$assign             = "GPIO12";
mcspi1.SPI.D0.$assign              = "GPIO13";
mcspi1.SPI.D1.$assign              = "GPIO14";
mcspi1.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH0";
mcspi1.mcspiChannel[0].bitRate     = 10000000;
mcspi1.mcspiChannel[0].frameFormat = "POL0_PHA1";
mcspi1.mcspiChannel[0].CSn.$assign = "GPIO11";
mcspi1.child.$name                 = "drivers_mcspi_v1_mcspi_v1_template0";

mcspi2.$name                       = "MCSPI1_PL";
mcspi2.inputSelect                 = "0";
mcspi2.dpe0                        = "DISABLE";
mcspi2.dpe1                        = "ENABLE";
mcspi2.SPI.$assign                 = "SPI1";
mcspi2.SPI.CLK.$assign             = "GPIO16";
mcspi2.SPI.D0.$assign              = "GPIO17";
mcspi2.SPI.D1.$assign              = "GPIO18";
mcspi2.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH1";
mcspi2.mcspiChannel[0].bitRate     = 10000000;
mcspi2.mcspiChannel[0].frameFormat = "POL0_PHA1";
mcspi2.mcspiChannel[0].CSn.$assign = "GPIO15";
mcspi2.child.$name                 = "drivers_mcspi_v1_mcspi_v1_template1";

mcspi3.$name                       = "MCSPI2_CAN";
mcspi3.inputSelect                 = "0";
mcspi3.dpe0                        = "DISABLE";
mcspi3.dpe1                        = "ENABLE";
mcspi3.SPI.$assign                 = "SPI2";
mcspi3.SPI.CLK.$assign             = "GPIO129";
mcspi3.SPI.D0.$assign              = "GPIO130";
mcspi3.SPI.D1.$assign              = "GPIO128";
mcspi3.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH2";
mcspi3.mcspiChannel[0].bitRate     = 10000000;
mcspi3.mcspiChannel[0].frameFormat = "POL0_PHA1";
mcspi3.mcspiChannel[0].CSn.$assign = "GPIO131";
mcspi3.child.$name                 = "drivers_mcspi_v1_mcspi_v1_template2";

mcspi4.$name                       = "MCSPI3_DRV8316";
mcspi4.intrEnable                  = "POLLED";
mcspi4.inputSelect                 = "0";
mcspi4.dpe0                        = "DISABLE";
mcspi4.dpe1                        = "ENABLE";
mcspi4.SPI.$assign                 = "SPI3";
mcspi4.SPI.CLK.$assign             = "GPIO24";
mcspi4.SPI.D0.$assign              = "GPIO25";
mcspi4.SPI.D1.$assign              = "GPIO26";
mcspi4.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH3";
mcspi4.mcspiChannel[0].bitRate     = 10000000;
mcspi4.mcspiChannel[0].frameFormat = "POL0_PHA1";
mcspi4.mcspiChannel[0].CSn.$assign = "GPIO23";
mcspi4.child.$name                 = "drivers_mcspi_v1_mcspi_v1_template3";

edma1.$name                        = "CONFIG_EDMA0";
mcspi1.edmaDriver                  = edma1;
mcspi2.edmaDriver                  = edma1;
mcspi3.edmaDriver                  = edma1;
mcspi4.edmaDriver                  = edma1;
flash1.peripheralDriver.edmaDriver = edma1;
mcan1.edmaDriver                   = edma1;
edma1.edmaRmDmaCh[0].$name         = "CONFIG_EDMA_RM0";
edma1.edmaRmQdmaCh[0].$name        = "CONFIG_EDMA_RM1";
edma1.edmaRmQdmaCh[0].endIndex     = 1;
edma1.edmaRmTcc[0].$name           = "CONFIG_EDMA_RM2";
edma1.edmaRmParam[0].$name         = "CONFIG_EDMA_RM3";

rti1.$name          = "CONFIG_RTI0";
rti1.counter0Enable = true;
rti1.compare0Enable = true;
rti1.enableIntr0    = true;
rti1.usecPerTick0   = 5000;
rti1.RTI.$assign    = "RTI2";

const soc_ctrl_adc    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_adc", {}, false);
const soc_ctrl_adc1   = soc_ctrl_adc.addInstance({}, false);
soc_ctrl_adc1.$name   = "soc_ctrl_adc0";
adc.adcReferences     = soc_ctrl_adc1;
const soc_ctrl        = scripting.addModule("/drivers/soc_ctrl/soc_ctrl", {}, false);
soc_ctrl.soc_ctrl_adc = soc_ctrl_adc1;

const soc_ctrl_cmpss    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_cmpss", {}, false);
const soc_ctrl_cmpss1   = soc_ctrl_cmpss.addInstance({}, false);
soc_ctrl_cmpss1.$name   = "soc_ctrl_cmpss0";
soc_ctrl.soc_ctrl_cmpss = soc_ctrl_cmpss1;

const soc_ctrl_epwm    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_epwm", {}, false);
const soc_ctrl_epwm1   = soc_ctrl_epwm.addInstance({}, false);
soc_ctrl_epwm1.$name   = "soc_ctrl_epwm0";
soc_ctrl.soc_ctrl_epwm = soc_ctrl_epwm1;
epwm.epwmTbClkSync     = soc_ctrl_epwm1;

const soc_ctrl_sdfm    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_sdfm", {}, false);
const soc_ctrl_sdfm1   = soc_ctrl_sdfm.addInstance({}, false);
soc_ctrl_sdfm1.$name   = "soc_ctrl_sdfm0";
soc_ctrl.soc_ctrl_sdfm = soc_ctrl_sdfm1;

clock.r5ClockFreq = "500MHz";

debug_log.enableUartLog            = true;
debug_log.uartLog.$name            = "UART1_MCU";
debug_log.uartLog.clockSource      = "SOC_RcmPeripheralClockSource_DPLL_PER_HSDIV0_CLKOUT2";
debug_log.uartLog.inputClkFreq     = 160000000;
debug_log.uartLog.UART.$assign     = "UART1";
debug_log.uartLog.UART.RXD.$assign = "GPIO75";
debug_log.uartLog.UART.TXD.$assign = "GPIO76";
debug_log.uartLog.child.$name      = "drivers_uart_v2_uart_v2_template0";

mpu_armv71.$name             = "CONFIG_MPU_REGION0";
mpu_armv71.size              = 31;
mpu_armv71.attributes        = "Device";
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv71.allowExecute      = false;

mpu_armv72.$name             = "CONFIG_MPU_REGION1";
mpu_armv72.size              = 15;
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";

mpu_armv73.$name             = "CONFIG_MPU_REGION2";
mpu_armv73.baseAddr          = 0x80000;
mpu_armv73.size              = 15;
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";

mpu_armv74.$name             = "CONFIG_MPU_REGION3";
mpu_armv74.baseAddr          = 0x70000000;
mpu_armv74.size              = 21;
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";

mpu_armv75.$name        = "CONFIG_MPU_REGION4";
mpu_armv75.baseAddr     = 0x50D00000;
mpu_armv75.size         = 14;
mpu_armv75.attributes   = "Device";
mpu_armv75.allowExecute = false;

mpu_armv76.$name        = "CONFIG_MPU_REGION5";
mpu_armv76.baseAddr     = 0x72000000;
mpu_armv76.size         = 14;
mpu_armv76.allowExecute = false;
mpu_armv76.attributes   = "NonCached";

mpu_armv77.$name      = "CONFIG_MPU_REGION6";
mpu_armv77.baseAddr   = 0x70090000;
mpu_armv77.size       = 14;
mpu_armv77.attributes = "NonCached";

default_linker1.$name = "memory_configurator_default_linker0";

general1.$name        = "CONFIG_GENERAL0";
general1.linker.$name = "TIARMCLANG0";

region1.$name                                = "MEMORY_REGION_CONFIGURATION0";
region1.memory_region.create(12);
region1.memory_region[0].type                = "TCMA";
region1.memory_region[0].$name               = "R5F_VECS";
region1.memory_region[0].auto                = false;
region1.memory_region[0].size                = 0x40;
region1.memory_region[1].type                = "TCMA";
region1.memory_region[1].$name               = "R5F_TCMA";
region1.memory_region[1].size                = 0x7FC0;
region1.memory_region[2].type                = "TCMB";
region1.memory_region[2].$name               = "R5F_TCMB";
region1.memory_region[2].size                = 0x8000;
region1.memory_region[3].type                = "CUSTOM";
region1.memory_region[3].$name               = "MAILBOX_HSM";
region1.memory_region[3].isShared            = true;
region1.memory_region[3].shared_cores        = ["r5fss0-1"];
region1.memory_region[3].auto                = false;
region1.memory_region[3].manualStartAddress  = 0x44000000;
region1.memory_region[3].size                = 0x3CE;
region1.memory_region[4].type                = "CUSTOM";
region1.memory_region[4].$name               = "MAILBOX_R5F";
region1.memory_region[4].isShared            = true;
region1.memory_region[4].shared_cores        = ["r5fss0-1"];
region1.memory_region[4].auto                = false;
region1.memory_region[4].manualStartAddress  = 0x44000400;
region1.memory_region[4].size                = 0x3CE;
region1.memory_region[5].type                = "FLASH";
region1.memory_region[5].$name               = "FLASH";
region1.memory_region[5].auto                = false;
region1.memory_region[5].size                = 0x80000;
region1.memory_region[6].$name               = "SBL";
region1.memory_region[6].auto                = false;
region1.memory_region[6].size                = 0x90000;
region1.memory_region[7].$name               = "CPPI_DESC";
region1.memory_region[7].auto                = false;
region1.memory_region[7].manualStartAddress  = 0x70090000;
region1.memory_region[7].size                = 0x4000;
region1.memory_region[8].$name               = "OCRAM";
region1.memory_region[8].auto                = false;
region1.memory_region[8].manualStartAddress  = 0x70094000;
region1.memory_region[8].size                = 0xD1000;
region1.memory_region[9].$name               = "USER_SHM_MEM";
region1.memory_region[9].isShared            = true;
region1.memory_region[9].shared_cores        = ["r5fss0-1"];
region1.memory_region[9].auto                = false;
region1.memory_region[9].manualStartAddress  = 0x70179F00;
region1.memory_region[9].size                = 0x6100;
region1.memory_region[10].type               = "TCMB";
region1.memory_region[10].$name              = "LOG_SHM_MEM";
region1.memory_region[10].auto               = false;
region1.memory_region[10].size               = 0x2000;
region1.memory_region[11].type               = "CUSTOM";
region1.memory_region[11].$name              = "RTOS_NORTOS_IPC_SHM_MEM";
region1.memory_region[11].isShared           = true;
region1.memory_region[11].shared_cores       = ["r5fss0-1"];
region1.memory_region[11].auto               = false;
region1.memory_region[11].manualStartAddress = 0x72000000;
region1.memory_region[11].size               = 0x3E80;

section1.load_memory                  = "R5F_VECS";
section1.group                        = false;
section1.$name                        = "Vector Table";
section1.output_section.create(1);
section1.output_section[0].$name      = ".vectors";
section1.output_section[0].palignment = true;

section2.load_memory                  = "OCRAM";
section2.$name                        = "Text Segments";
section2.output_section.create(5);
section2.output_section[0].$name      = ".text.hwi";
section2.output_section[0].palignment = true;
section2.output_section[1].$name      = ".text.cache";
section2.output_section[1].palignment = true;
section2.output_section[2].$name      = ".text.mpu";
section2.output_section[2].palignment = true;
section2.output_section[3].$name      = ".text.boot";
section2.output_section[3].palignment = true;
section2.output_section[4].$name      = ".text:abort";
section2.output_section[4].palignment = true;

section3.load_memory                  = "OCRAM";
section3.$name                        = "Code and Read-Only Data";
section3.output_section.create(2);
section3.output_section[0].$name      = ".text";
section3.output_section[0].palignment = true;
section3.output_section[1].$name      = ".rodata";
section3.output_section[1].palignment = true;

section4.load_memory                  = "OCRAM";
section4.$name                        = "Data Segment";
section4.output_section.create(1);
section4.output_section[0].$name      = ".data";
section4.output_section[0].palignment = true;

section5.$name                                    = "BSS Segments";
section5.load_memory                              = "SBL";
section5.output_section.create(1);
section5.output_section[0].$name                  = ".bss";
section5.output_section[0].output_sections_start  = "__BSS_START";
section5.output_section[0].output_sections_end    = "__BSS_END";
section5.output_section[0].input_section.create(1);
section5.output_section[0].input_section[0].$name = "*.bss";

section6.load_memory                              = "OCRAM";
section6.$name                                    = "Stack Segments";
section6.output_section.create(7);
section6.output_section[0].$name                  = ".irqstack";
section6.output_section[0].output_sections_start  = "__IRQ_STACK_START";
section6.output_section[0].output_sections_end    = "__IRQ_STACK_END";
section6.output_section[0].input_section.create(1);
section6.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
section6.output_section[1].$name                  = ".fiqstack";
section6.output_section[1].output_sections_start  = "__FIQ_STACK_START";
section6.output_section[1].output_sections_end    = "__FIQ_STACK_END";
section6.output_section[1].input_section.create(1);
section6.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
section6.output_section[2].$name                  = ".svcstack";
section6.output_section[2].output_sections_start  = "__SVC_STACK_START";
section6.output_section[2].output_sections_end    = "__SVC_STACK_END";
section6.output_section[2].input_section.create(1);
section6.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
section6.output_section[3].$name                  = ".abortstack";
section6.output_section[3].output_sections_start  = "__ABORT_STACK_START";
section6.output_section[3].output_sections_end    = "__ABORT_STACK_END";
section6.output_section[3].input_section.create(1);
section6.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
section6.output_section[4].$name                  = ".undefinedstack";
section6.output_section[4].output_sections_start  = "__UNDEFINED_STACK_START";
section6.output_section[4].output_sections_end    = "__UNDEFINED_STACK_END";
section6.output_section[4].input_section.create(1);
section6.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";
section6.output_section[5].$name                  = ".stack";
section6.output_section[6].$name                  = ".sysmem";

section7.load_memory                  = "OCRAM";
section7.$name                        = "Initialization and Exception Handling";
section7.output_section.create(3);
section7.output_section[0].$name      = ".ARM.exidx";
section7.output_section[0].palignment = true;
section7.output_section[1].$name      = ".init_array";
section7.output_section[1].palignment = true;
section7.output_section[2].$name      = ".fini_array";
section7.output_section[2].palignment = true;

section8.load_memory                              = "USER_SHM_MEM";
section8.type                                     = "NOLOAD";
section8.$name                                    = "User Shared Memory";
section8.group                                    = false;
section8.output_section.create(1);
section8.output_section[0].$name                  = ".bss.user_shared_mem";
section8.output_section[0].alignment              = 0;
section8.output_section[0].input_section.create(2);
section8.output_section[0].input_section[0].$name = "*(.shmR)";
section8.output_section[0].input_section[1].$name = "*(.shmTime)";

section9.$name                       = "Log Shared Memory";
section9.group                       = false;
section9.type                        = "NOLOAD";
section9.load_memory                 = "LOG_SHM_MEM";
section9.output_section.create(1);
section9.output_section[0].$name     = ".bss.log_shared_mem";
section9.output_section[0].alignment = 0;

section10.load_memory                 = "RTOS_NORTOS_IPC_SHM_MEM";
section10.type                        = "NOLOAD";
section10.$name                       = "IPC Shared Memory";
section10.group                       = false;
section10.output_section.create(1);
section10.output_section[0].$name     = ".bss.ipc_vring_mem";
section10.output_section[0].alignment = 0;

section11.load_memory                 = "MAILBOX_HSM";
section11.type                        = "NOLOAD";
section11.$name                       = "SIPC HSM Queue Memory";
section11.group                       = false;
section11.output_section.create(1);
section11.output_section[0].$name     = ".bss.sipc_hsm_queue_mem";
section11.output_section[0].alignment = 0;

section12.load_memory                 = "MAILBOX_R5F";
section12.$name                       = "SIPC R5F Queue Memory";
section12.group                       = false;
section12.type                        = "NOLOAD";
section12.output_section.create(1);
section12.output_section[0].$name     = ".bss.sipc_secure_host_queue_mem";
section12.output_section[0].alignment = 0;

section13.$name                       = "NDK Packet Memory CPPI_DESC";
section13.type                        = "NOLOAD";
section13.group                       = false;
section13.load_memory                 = "CPPI_DESC";
section13.output_section.create(1);
section13.output_section[0].$name     = ".bss:ENET_CPPI_DESC";
section13.output_section[0].alignment = 128;

section14.$name                       = "NDK Packet Memory DMA_PKT_MEMPOOL";
section14.type                        = "NOLOAD";
section14.group                       = false;
section14.load_memory                 = "OCRAM";
section14.output_section.create(1);
section14.output_section[0].$name     = ".bss:ENET_DMA_PKT_MEMPOOL";
section14.output_section[0].alignment = 128;

section15.$name                   = "TCMB Memory";
section15.load_memory             = "R5F_TCMB";
section15.output_section.create(1);
section15.output_section[0].$name = ".freertos_task_stack";

enet_cpsw1.$name                        = "CONFIG_ENET_CPSW0";
enet_cpsw1.LargePoolPktCount            = 40;
enet_cpsw1.MediumPoolPktSize            = 384;
enet_cpsw1.MediumPoolPktCount           = 56;
enet_cpsw1.PktInfoOnlyEnable            = true;
enet_cpsw1.RxCustomSizeEnable           = true;
enet_cpsw1.RxCustomSize                 = 384;
enet_cpsw1.macport1LinkSpeed            = "ENET_SPEED_1GBIT";
enet_cpsw1.macport1LinkDuplexity        = "ENET_DUPLEX_FULL";
enet_cpsw1.disableRgmiiIntDelay1        = true;
enet_cpsw1.DisableMacPort2              = true;
enet_cpsw1.cptsHostRxTsEn               = false;
enet_cpsw1.cptsRftClkFreq               = "CPSW_CPTS_RFTCLK_FREQ_200MHZ";
enet_cpsw1.mdioMode                     = "MDIO_MODE_MANUAL";
enet_cpsw1.customBoardEnable            = true;
enet_cpsw1.MDIO.$assign                 = "MDIO0";
enet_cpsw1.MDIO.MDC.$assign             = "GPIO42";
enet_cpsw1.MDIO.MDIO.$assign            = "GPIO41";
enet_cpsw1.RGMII1.$assign               = "RGMII1";
enet_cpsw1.RGMII1.RD0.$assign           = "GPIO31";
enet_cpsw1.RGMII1.RD1.$assign           = "GPIO32";
enet_cpsw1.RGMII1.RD2.$assign           = "GPIO33";
enet_cpsw1.RGMII1.RD3.$assign           = "GPIO34";
enet_cpsw1.RGMII1.RX_CTL.$assign        = "GPIO30";
enet_cpsw1.RGMII1.RXC.$assign           = "GPIO29";
enet_cpsw1.RGMII1.TD0.$assign           = "GPIO37";
enet_cpsw1.RGMII1.TD1.$assign           = "GPIO38";
enet_cpsw1.RGMII1.TD2.$assign           = "GPIO39";
enet_cpsw1.RGMII1.TD3.$assign           = "GPIO40";
enet_cpsw1.RGMII1.TX_CTL.$assign        = "GPIO36";
enet_cpsw1.RGMII1.TXC.$assign           = "GPIO35";
enet_cpsw1.RGMII2.$assign               = "RGMII2";
enet_cpsw1.RGMII2.RD0.$used             = false;
enet_cpsw1.RGMII2.RD1.$used             = false;
enet_cpsw1.RGMII2.RD2.$used             = false;
enet_cpsw1.RGMII2.RD3.$used             = false;
enet_cpsw1.RGMII2.RX_CTL.$used          = false;
enet_cpsw1.RGMII2.RXC.$used             = false;
enet_cpsw1.RGMII2.TD0.$used             = false;
enet_cpsw1.RGMII2.TD1.$used             = false;
enet_cpsw1.RGMII2.TD2.$used             = false;
enet_cpsw1.RGMII2.TD3.$used             = false;
enet_cpsw1.RGMII2.TX_CTL.$used          = false;
enet_cpsw1.RGMII2.TXC.$used             = false;
enet_cpsw1.txDmaChannel.create(2);
enet_cpsw1.txDmaChannel[0].$name        = "ENET_DMA_TX_CH0";
enet_cpsw1.txDmaChannel[0].PacketsCount = 8;
enet_cpsw1.txDmaChannel[1].$name        = "ENET_DMA_TX_CH1";
enet_cpsw1.txDmaChannel[1].PacketsCount = 8;
enet_cpsw1.rxDmaChannel.create(2);
enet_cpsw1.rxDmaChannel[0].$name        = "ENET_DMA_RX_CH0";
enet_cpsw1.rxDmaChannel[0].PacketsCount = 56;
enet_cpsw1.rxDmaChannel[1].$name        = "ENET_DMA_RX_CH1";
enet_cpsw1.rxDmaChannel[1].PacketsCount = 16;
enet_cpsw1.rxDmaChannel[1].macAddrCount = 0;
enet_cpsw1.netifInstance.create(1);
enet_cpsw1.netifInstance[0].$name       = "NETIF_INST_ID0";

int_xbar1.$name      = "CONFIG_INT_XBAR0";
int_xbar1.xbarOutput = ["ADC0_INT1"];
int_xbar1.instance   = "INT_XBAR_1";

Best regards

zx

  • Hi ZX,

    I suspect some clock configuration is missing the case where you run via Flash. You can check the MSS_RCM_CPSW_5_50_250_CLK_MUX_CTRL register and see the value. I'm working on getting it fixed properly. Until then you can try to manual program the above register with value as "0x333" and check if you get correct clock.

    Regards,
    Shaunak

  • There was a clock configuration missing which was causing this issue, If you use the DEV boot mode and load via JTAG, the GEL Scripts take care of the clock config, When you boot the application from flash, the SBL takes care of the clock config, which was missing a step. The code we ported for AM261x was from AM263x and there was a change in the default clock configurations. The 0x000 value worked in case of the other device but the AM261x required the register to be configured as 0x333.

    In AM263x, the CPSW RGMII clock select value has to be configured as 0x000 and It is the reset value also. So we did not face any issue in AM263x.

    But In AM261x the RGMII Mux select value should be 0x333 to get proper RGMII clock and reset value is 0x000. Because of this RGMII is not working in AM261x.
    Now we have added some code change in application to configure the RGMII clock correctly, The SDK v10.02 officially fixes it, but you can also use the below file (replace the existing file at this path): C:\ti\workarea_west\mcu_plus_sdk\source\networking\enet\core\sysconfig\networking\.meta\enet_cpsw\am261x\enet_cpsw_am261x.syscfg.js

    "use strict";
    
    let common = system.getScript("/common");
    let pinmux = system.getScript("/drivers/pinmux/pinmux");
    
    let soc = system.getScript(`/networking/soc/networking_${common.getSocName()}`);
    let device = common.getDeviceName();
    //Get packet pool configuration script
    const pktPoolScript = system.getScript("./enet_pkt_pool_config");
    //Get ALE configuration script
    const aleScript = system.getScript("./enet_cpsw_ale_config");
    //Get MDIO configuration script
    const mdioScript = system.getScript("./enet_cpsw_mdio_config");
    //Get Host Port configuration script
    const hostportScript = system.getScript("./enet_cpsw_hostport_config");
    //Get CPTS configuration script
    const cptsScript = system.getScript("./enet_cpsw_cpts_config");
    //Get MAC Port configuration script
    const macportScript = system.getScript("./enet_cpsw_macport_config");
    const utilsScript = system.getScript("./../../common/enet_cpsw_utils");
    const pinMuxScript = system.getScript("./enet_cpsw_am261x_pinmux");
    
    const enet_cpsw_pinmux_config = {
        name: "pinmuxConfig",
        displayName: "Pinmux config",
    	longDescription: "Configuration of pinmux for CPSW",
        collapsed:true,
        config: [
    
        ],
    };
    
    const enet_cpsw_cpdma_channel_config = {
        name: "cpdmaChConfig",
        displayName: "DMA channel config",
    	longDescription: "Configuration of Tx/Rx DMA channels",
        collapsed:true,
        config: [
    
        ],
    };
    
    const enet_cpsw_lwipIf_config = {
        name: "lwipIfConfig",
        displayName: "LWIP Interface config",
    	longDescription: "Configuration of LWIP Interface",
        collapsed:true,
        config: [
    
        ],
    };
    
    const enet_cpsw_system_config = {
        name: "cpswSystemConfig",
        displayName: "System integration config",
        longDescription: "System integration related configuration",
        collapsed:true,
        config: [
            {
                name: "McmEnable",
                description: "Flag to enable multi-client manager. Required for multi-core, multiple Enet client use cases",
                displayName: "Mcm Enable",
                default: false,
            },
            {
                name: "ExternalPhyMgmtEnable",
                description: "Flag to enable phy management in application. The enet driver internal phy functions including phy state machine is bypassed in this mode",
                displayName: "External Phy Management Enable",
                default: false,
                onChange:function (inst, ui) {
                    if(inst.ExternalPhyMgmtEnable == true) {
                        ui.macport1LinkSpeed.hidden = true;
                        ui.macport1LinkDuplexity.hidden = true;
                        ui.macport2LinkSpeed.hidden = true;
                        ui.macport2LinkDuplexity.hidden = true;
                    }
                    else{
                        ui.macport1LinkSpeed.hidden = false;
                        ui.macport1LinkDuplexity.hidden = false;
                        ui.macport2LinkSpeed.hidden = false;
                        ui.macport2LinkDuplexity.hidden = false;
                    }
                }
            },
            {
                name: "RtosVariant",
                description: "Select FreeRTOS or No RTOS",
                displayName: "RTOS Variant",
                default: "FreeRTOS",
                options: [
                    {
                        name: "FreeRTOS",
                        displayName: "FreeRTOS",
                    },
                    {
                        name: "NoRTOS",
                        displayName: "No RTOS (Bare Metal)",
                    },
                ],
            },
            {
                name: "macAddrConfig",
                description: "MAC address to set in the driver. 'Auto Assign shall select the address automatiically from EEPROM and/or EFUSES. 'Manual Entry' will allow to input MAC address",
                displayName: "MAC Address Assignment Method",
                onChange:function (inst, ui) {
                    if(inst.macAddrConfig === "Auto Assign") {
                        ui.macAddrList.hidden = true;
                    } else {
                        ui.macAddrList.hidden = false;
                    }
                },
                options: [
                    {
                        name: "Auto Assign",
                    },
                    {
                        name: "Manual Entry",
                    },
                ],
                default: "Auto Assign",
            },
            {
                name: "macAddrList",
                description: "MAC address to set in the driver. Enter MAC address. Seperate multiple MAC address with comma. Eg.: aa:bb:bb:cc:dd:ee,01:22:33:aa:bb:ee",
                displayName: "MAC Address List",
                default: "70:ff:76:1d:ec:f2,70:ff:76:1d:ec:e3",
                hidden: true,
            },
            {
                name: "AppLinkUpPortMask",
                description: "Application config to determine which macPorts should be polled for linkup to indicate link is up.Applicable in multi port scenario only",
                displayName: "AppLinkUpPortMask Config",
                default: "ANY_PORT",
                options: [
                    {
                        name: "ALL_PORTS",
                    },
                    {
                        name: "ANY_PORT",
                    },
                ],
            },
        ],
    };
    
    const enet_cpsw_board_config = {
        name: "cpswBoardConfig",
        displayName: "Board Config",
        longDescription: "Board specific configuration",
        collapsed:true,
        config: [
            {
                name: "customBoardEnable",
                description: "Enable Custom Board Configuration",
                displayName: "Custom Board",
                longDescription: "Configuration for custom board that are not supported out of box in MCU+ SDK",
                default: false,
            },
        ],
    };
    
    function getInterfaceNameList(inst) {
        return pinMuxScript.getInterfaceNameList(inst);
    }
    
    function pinmuxRequirements(inst) {
        return pinMuxScript.pinmuxRequirements(inst);
    }
    
    function getPeripheralPinNames(inst)
    {
        return pinMuxScript.getPeripheralPinNames(inst);
    }
    
    function getEnetClockConfig(device_name)
    {
      var enet_clock_config;
    
        if (device_name === "am261x-lp")
        {
    enet_clock_config =
        {
    
    	clockIds        : [ "SOC_RcmPeripheralId_CPTS", "SOC_RcmPeripheralId_CPSW_5_50_250"],
    	clockFrequencies: [
    	    {
    	        moduleId: "SOC_RcmPeripheralId_CPTS",
    	        clkId   : "SOC_RcmPeripheralClockSource_SYS_CLK",
    	        clkRate : 250000000,
    	    },
            {
    	        moduleId: "SOC_RcmPeripheralId_CPSW_5_50_250",
    	        clkId   : "SOC_RcmPeripheralClockSource_DPLL_CORE_HSDIV0_CLKOUT1",
    	        clkRate : 500000000,
    	    },
    	],
        }
        }
        else if (device_name === "am261x-som")
        {
    enet_clock_config =
        {
    
    	clockIds        : [ "SOC_RcmPeripheralId_CPTS", , "SOC_RcmPeripheralId_CPSW_5_50_250"],
    	clockFrequencies: [
    	    {
    	        moduleId: "SOC_RcmPeripheralId_CPTS",
    	        clkId   : "SOC_RcmPeripheralClockSource_SYS_CLK",
    	        clkRate : 200000000,
    	    },
            {
    	        moduleId: "SOC_RcmPeripheralId_CPSW_5_50_250",
    	        clkId   : "SOC_RcmPeripheralClockSource_DPLL_CORE_HSDIV0_CLKOUT1",
    	        clkRate : 500000000,
    	    },
    	],
        }
        }
    
        return enet_clock_config;
    }
    
    function getClockEnableIds(instance) {
        let instConfig = getEnetClockConfig(device);
        return instConfig.clockIds;
    }
    
    function getClockFrequencies(inst) {
        let instConfig = getEnetClockConfig(device);
        return instConfig.clockFrequencies;
    }
    
    function getDmaInterface(instance) {
        let cpswInstInfo = getCpswInstInfo(instance);
        return cpswInstInfo.dmaIf;
    }
    
    function getInstIdTable(instances) {
        let tbl = '{ '
        for (var i = 0; i < instances.length; i++)
        {
            tbl += '{';
            var matchedInst = getCpswInstInfo(instances[i])
            tbl += i + ', ' + matchedInst.enetType + ', ' +  matchedInst.instId
            tbl += '}, '
        }
        tbl += '}'
        return tbl;
    }
    
    function getMiiConfig(instance) {
        const cpswMiiConfigMap = new Map(
        [
            ["RGMII",{layerType:"ENET_MAC_LAYER_GMII", variantType:"ENET_MAC_VARIANT_FORCED", sublayerType:"ENET_MAC_SUBLAYER_REDUCED"}],
            ["RMII", {layerType:"ENET_MAC_LAYER_MII", variantType:"ENET_MAC_VARIANT_NONE", sublayerType:"ENET_MAC_SUBLAYER_REDUCED"}],
            ["MII", {layerType:"ENET_MAC_LAYER_MII", variantType:"ENET_MAC_VARIANT_NONE", sublayerType:"ENET_MAC_SUBLAYER_STANDARD"}],
        ],)
        return cpswMiiConfigMap.get(instance.phyToMacInterfaceMode);
    }
    
    function getCpswInstInfo(instance) {
        const cpswInstInfoMap = new Map(
                                   [
                                     ['am261x',{enetType: 'ENET_CPSW_3G', numMacPorts: '2', instId: '0', dmaIf:'ENET_SOC_HOSTPORT_DMA_TYPE_CPDMA', macPortList:['ENET_MAC_PORT_1', 'ENET_MAC_PORT_2']}],
                                   ],
                                 );
        let instInfo =  cpswInstInfoMap.get(common.getSocName());
        instInfo.macPortList = instInfo.macPortList.filter(function(macPort, index,arr){
            let includeEntry = true;
            if ((macPort === 'ENET_MAC_PORT_1') && (instance.DisableMacPort1 === true))
            {
                includeEntry = false;
            }
            if ((macPort === 'ENET_MAC_PORT_2') && (instance.DisableMacPort2 === true))
            {
                includeEntry = false;
            }
            return includeEntry;
        });
        instInfo.numMacPorts = instInfo.macPortList.length;
        return instInfo;
    }
    
    function getBoardConfigTemplateInfo() {
        const boardConfigTemplate = new Map(
                                   [
                                     ['am261x',{Cfile: "/board/ethphy_cpsw_icssg/templates/am261x/enet_board_cfg.c.xdt",
                                     
                                     Header: "/board/ethphy_cpsw_icssg/templates/am261x/enet_board_cfg.h.xdt"}],
                                   ],
                                 );
        return boardConfigTemplate.get(common.getSocName());
    }
    
    
    function getSocConfigTemplateInfo() {
        const socConfigTemplate = new Map(
                                   [
                                     ['am261x',{Cfile: "/networking/enet_cpsw/templates/am261x/enet_soc_cfg.c.xdt"}],
                                   ],
                                 );
        return socConfigTemplate.get(common.getSocName());
    }
    
    function getPacketsCount(instance, channelType) {
        let totalNumPackets = 0;
        let driverVer = soc.getDriverVer("enet_cpsw");
        let dma_ch_instances;
        let module_dma_ch;
    
        if (channelType === "TX")
        {
            dma_ch_instances = instance.txDmaChannel;
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_tx_channel`];
        }
        else
        {
            dma_ch_instances = instance.rxDmaChannel;
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_rx_channel`];
        }
    
        for(let ch = 0; ch < dma_ch_instances.length; ch++) {
            let ch_instance = dma_ch_instances[ch];
            let ch_config = module_dma_ch.getInstanceConfig(ch_instance);
            totalNumPackets += ch_config.PacketsCount;
        }
        return totalNumPackets;
    }
    
    function getChannelCount(instance, channelType) {
        let totalNumChannels = 0;
        let driverVer = soc.getDriverVer("enet_cpsw");
        let dma_ch_instances;
        let module_dma_ch;
    
        if (channelType === "TX")
        {
            dma_ch_instances = instance.txDmaChannel;
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_tx_channel`];
        }
        else
        {
            dma_ch_instances = instance.rxDmaChannel;
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_rx_channel`];
        }
    
        for(let ch = 0; ch < dma_ch_instances.length; ch++) {
            let ch_instance = dma_ch_instances[ch];
            let ch_config = module_dma_ch.getInstanceConfig(ch_instance);
            totalNumChannels++;
        }
        return totalNumChannels;
    }
    
    function getTxPacketsCount(instance) {
        return getPacketsCount(instance, "TX");
    }
    
    function getRxPacketsCount(instance) {
        return getPacketsCount(instance, "RX");
    }
    
    function getTxChannelCount(instance) {
        return getChannelCount(instance, "TX");
    }
    
    function getRxChannelCount(instance) {
        return getChannelCount(instance, "RX");
    }
    
    function getNumCpdmaDesc(instance) {
        /* Tx packet requires Two Tx scatter gather segments + 1 csum offload descriptor */
        const txDesc2PacketScalingFactor = 3;
        /* Rx packet requires only one desc per packet till scatter gather is supported.
         * Csum info is at end of packet and no cpdma desc is used */
        const rxDesc2PacketScalingFactor = 1;
        let cpdmaNumDesc = (rxDesc2PacketScalingFactor * getRxPacketsCount(instance)) + (txDesc2PacketScalingFactor * getTxPacketsCount(instance));
        return  cpdmaNumDesc;
    }
    
    function getChannelConfig(instance, channelType, chTypeInstNum) {
        let driverVer = soc.getDriverVer("enet_cpsw");
        let dma_ch_instances;
        let module_dma_ch;
    
        if (channelType === "TX")
        {
            dma_ch_instances = instance.txDmaChannel;
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_tx_channel`];
        }
        else
        {
            dma_ch_instances = instance.rxDmaChannel;
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_rx_channel`];
        }
        let channelCfgArray = new Array();
    
    
        for(let ch = 0; ch < dma_ch_instances.length; ch++) {
            let ch_instance = dma_ch_instances[ch];
            let ch_config = module_dma_ch.getInstanceConfig(ch_instance);
            channelCfgArray.push(ch_config);
        }
        return channelCfgArray[chTypeInstNum];
    }
    
    function getDefaultPacketCount(channelType) {
        let driverVer = soc.getDriverVer("enet_cpsw");
        let module_dma_ch;
    
        if (channelType === "TX")
        {
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_tx_channel`];
        }
        else
        {
            module_dma_ch = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_rx_channel`];
        }
        return (module_dma_ch.config.filter(o => o.name === 'PacketsCount'))[0].default;
    }
    
    
    function getNetifCount(instance) {
        let driverVer = soc.getDriverVer("enet_cpsw");
        let totalNumNetifs = 0;
        let instances;
        let module;
    
        instances = instance.netifInstance;
        module = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_lwipif_netif`];
    
        for(let num = 0; num < instances.length; num++) {
            let num_instance = instances[num];
            totalNumNetifs++;
        }
        return totalNumNetifs;
    }
    
    function getNetifConfig(instance, InstNum) {
        let driverVer = soc.getDriverVer("enet_cpsw");
        let instances;
        let module;
    
        instances = instance.netifInstance;
        module = system.modules[`/networking/enet_cpsw/${driverVer}/enet_cpsw_lwipif_netif`];
    
        let cfgArray = new Array();
    
    
        for(let num = 0; num < instances.length; num++) {
            let num_instance = instances[num];
            let num_config = module.getInstanceConfig(num_instance)[`moduleInstance`];
            cfgArray.push(num_config);
        }
        return cfgArray[InstNum];
    }
    
    function getNetifPacketDequeueMode(instance){
        let enableTimerBasedPoll = (getNetifConfig(instance, 0).packetDequeueMode === "TimerBasedPolling") ? 1 : 0;
        return enableTimerBasedPoll;     
    }
    
    function verifyNetifPacketDequeueMode(instance){
        let timerEnabledNetifcount = 0;
        let firstNetifMode = getNetifConfig(instance, 0).packetDequeueMode;
    
        for (let Idx = 1; Idx < getNetifCount(instance); Idx++)
        {
            if(getNetifConfig(instance, Idx).packetDequeueMode !==firstNetifMode){
                return false;
            }
        }
        return true;
    }
    
    
    function getDefaultNetifCount(instance)
    {
        let defaultNetifCount = 0;
    
        for (let Idx = 0; Idx < getNetifCount(instance); Idx++)
        {
            defaultNetifCount += (getNetifConfig(instance, Idx).isDefault === true) ? 1 : 0;
        }
        return defaultNetifCount;
    
    }
    
    function getDefaultNetifIdx(instance)
    {
        let defaultNetifIdx = -1;
    
        for (let Idx = 0; Idx < getNetifCount(instance); Idx++)
        {
            if(getNetifConfig(instance, Idx).isDefault === true)
            {
                defaultNetifIdx = Idx;
                break;
            }
        }
        return defaultNetifIdx;
    }
    
    function getCpuID() {
        return system.getScript(`/drivers/soc/drivers_${common.getSocName()}`).getCpuID();
    }
    
    function validate(instance, report) {
        pktPoolScript.validate(instance, report);
        aleScript.validate(instance, report);
        mdioScript.validate(instance, report);
        macportScript.validate(instance, report);
        hostportScript.validate(instance, report);
    
        if (getNetifCount(instance) > 0)
        {
            if (getDefaultNetifCount(instance) !=1)
            {
                report.logError(`Only one netif can be set as default`, instance, "netifInstance");
            }
            if(verifyNetifPacketDequeueMode(instance) === false){
                report.logError(`Both the Netif should be in same PacketDeque Mode`, instance,);
            }
    
            if (getNetifCount(instance) === 2)
            {
                if ((instance.DisableMacPort1 === true) || (instance.DisableMacPort2 === true))
                {
                    report.logError("Both MAC ports in MAC PORT Config should be enabled to support two NetIfs", instance);
                }
    
                if ((instance.macOnlyEn_hostPort === false) || (instance.macOnlyEn_macPort1 === false) || (instance.macOnlyEn_macPort2 === false))
                {
                    report.logError("All Ports in 'ALE Config -> ALE Port Config -> MAC-only mode config' should be in MAC-only mode in case of two NetIfs", instance);
                }
            }
        }
        if (/^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}(,([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})+/.test(instance.macAddrList) == false)
        {
            report.logError(`Invalid macAddrList Entry`, instance, "macAddrList");
        }
    }
    
    function moduleInstances(instance) {
    
        let Instances  = new Array();
        let driverVer = soc.getDriverVer("enet_cpsw");
        let maxCh     = 8;
        let maxNetif  = 2;
    
        Instances.push({
            name: "txDmaChannel",
            displayName: "ENET tx dma channel",
            moduleName: `/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_tx_channel`,
            useArray: true,
            minInstanceCount: 1,
            maxInstanceCount: maxCh,
            defaultInstanceCount: 1,
            collapsed:false,
            group: "cpdmaChConfig",
        });
    
        Instances.push({
            name: "rxDmaChannel",
            displayName: "ENET rx dma channel",
            moduleName: `/networking/enet_cpsw/${driverVer}/enet_cpsw_${driverVer}_rx_channel`,
            useArray: true,
            minInstanceCount: 1,
            maxInstanceCount: maxCh,
            defaultInstanceCount: 1,
            collapsed:false,
            group: "cpdmaChConfig",
        });
    
        Instances.push({
            name: "netifInstance",
            displayName: "NETIF instance",
            moduleName: `/networking/enet_cpsw/${driverVer}/enet_cpsw_lwipif_netif`,
            useArray: true,
            minInstanceCount: 0,
            maxInstanceCount: maxNetif,
            defaultInstanceCount: 0,
            collapsed:false,
            group: "lwipIfConfig",
        });
    
        return (Instances);
    }
    
    function addSharedModuleInstances(inst) {
        let modInstances = new Array();
    
        if((inst.DisableMacPort1 === false) && (inst.customBoardEnable === false)){
            modInstances.push({
                name: "ethphy1",
                displayName: "Port 1 PHY Configuration",
                moduleName: "/board/ethphy_cpsw_icssg/ethphy_cpsw_icssg",
                requiredArgs: {
                    boardType: inst.BoardType,
                    peripheral: "CPSW_MAC_PORT_1",
                    enableCustomBoard: inst.customBoardEnable,
                },
                group: "macPort1Cfg",
                });
        }
    
        if((inst.DisableMacPort2 == false) && (inst.customBoardEnable === false)){
            modInstances.push({
                name: "ethphy2",
                displayName: "Port 2 PHY Configuration",
                moduleName: "/board/ethphy_cpsw_icssg/ethphy_cpsw_icssg",
                requiredArgs: {
                    boardType: inst.BoardType,
                    peripheral: "CPSW_MAC_PORT_2",
                    enableCustomBoard: inst.customBoardEnable,
                },
                group: "macPort2Cfg",
                });
        }
    
        return modInstances;
    }
    function getCpuInfo() {
    	const cpuInfo = new Map(
                                   [
                                     ['CSL_CORE_ID_R5FSS0_0',{subsystem: "R5FSS",
                                      clusternum: "0", core: "0"}],
                                     ['CSL_CORE_ID_R5FSS0_1',{subsystem: "R5FSS",
                                      clusternum: "0", core: "1"}],
                                   ],
                                 );
    	return cpuInfo.get(getCpuID());
    }
    
    let enet_cpsw_module_name = "/networking/enet_cpsw/enet_cpsw";
    
    let enet_cpsw_module = {
    
        displayName: "Enet (CPSW)",
        longDescription: "Driver for Common Port SWitch (CPSW). Support MAC, Switch and used in auto and industrial Ethernet to run TCP/IP, AVB etc. applications. TSN is supported via CPSW",
        templates: {
            "/drivers/pinmux/pinmux_config.c.xdt": {
                moduleName: enet_cpsw_module_name,
            },
            "/drivers/system/system_config.h.xdt": {
                driver_config: "/networking/enet_cpsw/templates/enet_cpsw_v3.h.xdt",
                moduleName: enet_cpsw_module_name,
            },
            "/drivers/system/power_clock_config.c.xdt": {
                moduleName: enet_cpsw_module_name,
            },
            "/board/board/board_config.h.xdt": {
                board_config: getBoardConfigTemplateInfo().Header,
                moduleName: enet_cpsw_module_name,
            },
            "/board/board/board_config.c.xdt": {
                board_config: getBoardConfigTemplateInfo().Cfile,
                moduleName: enet_cpsw_module_name,
            },
            "/networking/common/enet_config.c.xdt": {
                enet_mem_config: "/networking/enet_cpsw/templates/enet_app_memutils_cfg_cpdma.c.xdt",
                enet_syscfg_info: "/networking/enet_cpsw/templates/enet_app_syscfg_info.c.xdt",
                moduleName: enet_cpsw_module_name,
            },
            "/networking/common/enet_config.h.xdt": {
                enet_config: "/networking/enet_cpsw/templates/enet_syscfg.h.xdt",
                moduleName: enet_cpsw_module_name,
            },
            "/networking/common/enet_open.c.xdt": {
                enet_open: "/networking/enet_cpsw/templates/enet_init.c.xdt",
                enet_init_config: "/networking/enet_cpsw/templates/enet_app_cpsw_cfg.c.xdt",
                moduleName: enet_cpsw_module_name,
            },
            "/networking/common/enet_open.h.xdt": {
                enet_open: "/networking/enet_cpsw/templates/enet_init.h.xdt",
                moduleName: enet_cpsw_module_name,
            },
            "/networking/common/enet_soc.c.xdt": {
                enet_soc: getSocConfigTemplateInfo().Cfile,
                moduleName: enet_cpsw_module_name,
            },
            "/networking/common/enet_lwipif.c.xdt": {
                enet_lwipif: "/networking/enet_cpsw/templates/enet_lwipif.c.xdt",
                moduleName: enet_cpsw_module_name,
            },
            "/networking/common/enet_lwipif.h.xdt": {
                enet_lwipif: "/networking/enet_cpsw/templates/enet_lwipif.h.xdt",
                moduleName: enet_cpsw_module_name,
            },
        },
        defaultInstanceName: "CONFIG_ENET_CPSW",
        config: [
            {
                name: "BoardType",
                description: "Board selection for AM261x",
                displayName: "BoardType",
                default: "am261x-lp (dp83tg720 phy)",
                options: [
                    {
                        name: "am261x-lp (dp83tg720 phy)",
                    },
                    {
                        name: "am261x-lp (dp83826 phy)",
                    },
                    {
                        name: "am261x-som",
                    },
                ],
            },
            enet_cpsw_system_config,
            enet_cpsw_cpdma_channel_config,
            pktPoolScript.config,
            enet_cpsw_lwipIf_config,
            aleScript.config,
            mdioScript.config,
            hostportScript.config,
            macportScript.config,
            cptsScript.config,
            enet_cpsw_board_config,
            pinMuxScript.config,
        ],
        moduleStatic: {
            modules: function(inst) {
                return [{
                    name: "system_common",
                    moduleName: "/system_common",
                }]
            },
        },
        moduleInstances: moduleInstances,
        utils: utilsScript,
        sharedModuleInstances: addSharedModuleInstances,
        pinmuxRequirements,
        getInterfaceNameList,
        getPeripheralPinNames,
        getClockEnableIds,
        getClockFrequencies,
        getDmaInterface,
        getInstIdTable,
        getCpswInstInfo,
        getBoardConfigTemplateInfo,
        getCpuID,
        getCpuInfo,
        getSocConfigTemplateInfo,
        getTxPacketsCount,
        getRxPacketsCount,
        getRxChannelCount,
        getTxChannelCount,
        getNumCpdmaDesc,
        getChannelConfig,
        getDefaultPacketCount,
        getNetifCount,
        getNetifConfig,
        getNetifPacketDequeueMode,
        getDefaultNetifIdx,
        getMiiConfig,
        validate: validate,
    };
    
    exports = enet_cpsw_module;

    Regards,
    Shaunak

  • Hi Shaunak,

    Do I just need to replace the enet_cpsw_am261x.syscfg.js? Is there anything else I need to configure in syscfg

    zx

  • Hi ZX,

    1. Apologies for an incomplete response, Inside the enet folder, the above change is sufficient (syscfg file replacement), Apart from that, you also need to update your source/drivers/soc/am261x files with the files below:

     soc_rcm.c

    soc_rcm.h

    Post this, rebuild your libraries in the SDK, then re-build your application. This should fix the incorrect clock.

    2. We also have the AM261x v10.02 SDK released with some bug-fixes (including the one above) in case you are interested in checking that out.

    Regards,
    Shaunak