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.
Tool/software:
Hi Team,
While working on Ethernet i have few observation
1. I initialized an empty project in that, configure RGMII with lwip (CPSW).
While Building C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source\networking/enet/utils/include/enet_board.h:48:10: fatal error: 'enet.h' file not found its giving error
So kindly let me know how to solve this.
2. While configure RMII mode pin mux is not define as in RGMII mode, it configure only one port second port's pins are disable
i also follow the
kindly let me know how to solve it
Hi,
i am also getting this error in empty project
while i import enet_cpsw_rawhttpserver_am263x-cc_r5fss0-0_nortos_ti-arm-clang i am not getting this error even this variable is not define in this example, using netif_input rather then tcip_input
Please guide me
Hi Swati,
The reason for these errors is missing include files and include paths in your project properties. When you import an ethernet project in CCS, you get no errors because these paths are already included. In an empty project, as the name suggests, it is supposed to be unconfigured or empty with no ethernet paths added in the file directories.
To resolve this error, I would recommend comparing the project properties (Compiler and Linker properties) of your empty project and consuming the include paths/dirs in the CCS project properties (right click on the empty project, go to properties)
Make sure your "ARM COMPILER -> Include Options" and "ARM LINKER -> File Search paths" match similar to the ethernet project. Then rebuild your project and it should compile successfully.
Regards,
Shaunak
Hi Shaunak Deshpande,
I Configure ethernet project on empty project it is building fine but with RGMII, when i goes for RMII i am getting this error
**** Build of configuration Release for project drivers_am263x-cc_r5fss0-0_nortos_ti-arm-clang **** "C:\\ti\\ccs1250\\ccs\\utils\\bin\\gmake" -k -j 8 all -O Building file: "../example.syscfg" Invoking: SysConfig "C:/ti/sysconfig_1.20.0/sysconfig_cli.bat" -s "C:/ti/mcu_plus_sdk_am263x_09_02_00_55/.metadata/product.json" --script "D:/workspace/AM2634_Drivers/drivers_am263x-cc_r5fss0-0_nortos_ti-arm-clang/example.syscfg" --context "r5fss0-0" -o "syscfg" --part AM263x --package ZCZ --compiler ticlang Running script... Validating... info: SERVICE_PORT(/drivers/uart/uart) baudRate: Actual Baudrate Possible: 115385 (0 % error) info: RADIO_DATA(/drivers/uart/uart) baudRate: Actual Baudrate Possible: 115385 (0 % error) info: RADIO_CONTROL(/drivers/uart/uart) baudRate: Actual Baudrate Possible: 9585 (0 % error) info: BIU(/drivers/uart/uart) baudRate: Actual Baudrate Possible: 9585 (0 % error) info: RFID_READER1(/drivers/uart/uart) baudRate: Actual Baudrate Possible: 115385 (0 % error) info: RFID_READER2(/drivers/uart/uart) baudRate: Actual Baudrate Possible: 115385 (0 % error) info: CONFIG_MPU_REGION0(/kernel/dpl/mpu_armv7) attributes: Some memory region(s) within this range is Shared among cores. info: CONFIG_MPU_REGION1(/kernel/dpl/mpu_armv7) attributes: Some memory region(s) within this range is Shared among cores. info: CONFIG_MPU_REGION2(/kernel/dpl/mpu_armv7) attributes: Some memory region(s) within this range is Shared among cores. info: CONFIG_MPU_REGION3(/kernel/dpl/mpu_armv7) attributes: Some memory region(s) within this range is Shared among cores. Generating Code (example.syscfg)... subdir_rules.mk:16: recipe for target 'build-909863937' failed TypeError: Cannot read properties of undefined (reading 'MDIO_MDIO') at subTemplateFunction (C:\ti\mcu_plus_sdk_am263x_09_02_00_55\source\drivers\.meta\pinmux\pinmux_module_config.c.xdt:69:44) at C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\src\pinmux\services\resources\runtime.ts:108:11 at templateFunc (C:\ti\mcu_plus_sdk_am263x_09_02_00_55\source\drivers\.meta\pinmux\pinmux_config.c.xdt:16:74) at func (C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\src\pinmux\services\codeGeneration\templateRunner.ts:29:39) at allowPathVisibility (C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\src\pinmux\services\pathsVisibility.ts:11:10) at runTemplate (C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\src\pinmux\services\codeGeneration\templateRunner.ts:29:13) at t.CodeGenerator.generate (C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\src\pinmux\services\codeGeneration\codeGenerator.ts:115:10) at iteratee (C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\src\pinmux\services\codeGeneration\codeGenerator.ts:120:26) at baseMap (C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\node_modules\lodash\lodash.js:653:23) at Function.wa [as map] (C:\ti\sysconfig_1.20.0\dist\webpack:\sysconfig\node_modules\lodash\lodash.js:9621:51) gmake: *** [build-909863937] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
Can you guide me regarding this
Hi Swati,
Can you share the steps you used to configure RMII instead of RGMII?
Regards,
Shaunak
Hi Shaunak,
As per your suggestion of include file path and all, I did the same and project complied successfully with RGMII in empty project.
I just change RGMII to RMII only after that its showing error as mention in previous message.
Hi Swati,
Just confirming once, from the previous thread that you linked above, you did take these changes in your SDK as well right?
Regards,
Shaunak
Hi Swati,
Im able to reproduce the issue. I'll look into it and try to find a fix.
Regards,
Shaunak
Hi Shaunak,
Thank you so much Shaunak for identifying this issue, could you please try to resolve this as soon as possible, because of this error my project is halt
Hi Swati,
With the above changes, in the same file (enet_cpsw_am263x_pinmux.syscfg.js), can you try adding this one more change:
Inside the function "getInterfaceNameList", for the RMII condition, can you modify as follows (the RMII else if condition).
Just to make sure we are on the same page, i will attach my complete file as well.
let common = system.getScript("/common"); let pinmux = system.getScript("/drivers/pinmux/pinmux"); let device = common.getDeviceName(); let soc = system.getScript(`/networking/soc/networking_${common.getSocName()}`); function getInstanceConfig(moduleInstance) { return { ...moduleInstance, }; }; function getPeripheralRequirements(inst, peripheralName, name) { let interfaceName = getInterfaceName(inst, peripheralName); let resources = []; let pinResource = {}; if(peripheralName == "RGMII") { pinResource = pinmux.getPinRequirements(interfaceName, "RD0", "RD0"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "RD1", "RD1"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "RD2", "RD2"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "RD3", "RD3"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "RX_CTL", "RX_CTL"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "RXC", "RX_RXC"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TD0", "TD0"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TD1", "TD1"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TD2", "TD2"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TD3", "TD3"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TX_CTL", "TX_CTL"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TXC", "TX_RXC"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); } else if(peripheralName == "RMII") { pinResource = pinmux.getPinRequirements(interfaceName, "RXD0", "RXD0"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "RXD1", "RXD1"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "RX_ER", "RX_ER"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TXD0", "TXD0"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "TXD1", "TXD1"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "CRS_DV", "CRS_DV"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); pinResource = pinmux.getPinRequirements(interfaceName, "REF_CLK", "REF_CLK"); pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource); } else if (name == "CPSW_CPTS") { pinResource = pinmux.getPinRequirements(interfaceName, "CPTS0_TS_SYNC", "CPTS0_TS_SYNC"); pinmux.setConfigurableDefault( pinResource, "rx", false ); resources.push( pinResource); } else { let pinList = getInterfacePinList(inst, interfaceName); for(let pin of pinList) { pinResource = pinmux.getPinRequirements(interfaceName, pin); /* make all pins as "rx" and then override to make "rx" as false as needed */ pinmux.setConfigurableDefault( pinResource, "rx", true ); resources.push( pinResource ); } } let peripheralRequirements = { name: name, displayName: name, interfaceName: interfaceName, resources: resources, }; return peripheralRequirements; } function getInterfaceName(inst, peripheralName) { return `${peripheralName}`; } function getInterfacePinList(inst, peripheralName) { let interfaceName = getInterfaceName(inst, peripheralName); let pinList = []; pinList = pinmux.getInterfacePinList(interfaceName); return pinList; } function pinmuxRequirements(inst) { let perRequirements = []; if (inst.enableTsOut === true) { let cptsTsSync = getPeripheralRequirements(inst, "CPTS", "CPSW_CPTS"); pinmux.setPeripheralPinConfigurableDefault( cptsTsSync, "CPSW_CPTS", "rx", false); perRequirements.push(cptsTsSync); } let mdio = getPeripheralRequirements(inst, "MDIO", "MDIO"); /* set default values for "rx" for different pins, based on use case */ pinmux.setPeripheralPinConfigurableDefault( mdio, "MDC", "rx", false); perRequirements.push(mdio); if( inst.phyToMacInterfaceMode === "MII") { let mii1 = getPeripheralRequirements(inst, "MII", "MII1"); let mii2 = getPeripheralRequirements(inst, "MII", "MII2"); return [mdio, mii1, mii2]; } else if( inst.phyToMacInterfaceMode === "RMII") { let rmii1 = getPeripheralRequirements(inst, "RMII", "RMII1"); let rmii2 = getPeripheralRequirements(inst, "RMII", "RMII2"); //pinmux.setPeripheralPinConfigurableDefault( rmii, "RMII1_TXD0", "rx", false); //pinmux.setPeripheralPinConfigurableDefault( rmii, "RMII1_TXD1", "rx", false); //pinmux.setPeripheralPinConfigurableDefault( rmii, "RMII1_TX_EN", "rx", false); //pinmux.setPeripheralPinConfigurableDefault( rmii, "RMII2_TXD0", "rx", false); //pinmux.setPeripheralPinConfigurableDefault( rmii, "RMII2_TXD1", "rx", false); //pinmux.setPeripheralPinConfigurableDefault( rmii, "RMII2_TX_EN", "rx", false); perRequirements.push(rmii1); perRequirements.push(rmii2); } else { let rgmii1 = getPeripheralRequirements(inst, "RGMII", "RGMII1"); let rgmii2 = getPeripheralRequirements(inst, "RGMII", "RGMII2"); perRequirements.push(rgmii1); perRequirements.push(rgmii2); } return perRequirements; } function getInterfaceNameList(inst) { let interfaceNameList = [] interfaceNameList.push(getInterfaceName(inst, "MDIO")) if (inst.enableTsOut === true) { interfaceNameList.push("CPSW_CPTS") } if (inst.phyToMacInterfaceMode === "MII") { interfaceNameList.push(getInterfaceName(inst, "MII1")); interfaceNameList.push(getInterfaceName(inst, "MII2")); } else if (inst.phyToMacInterfaceMode === "RMII") { interfaceNameList.push(getInterfaceName(inst, "RMII1")); interfaceNameList.push(getInterfaceName(inst, "RMII2")); } else { interfaceNameList.push(getInterfaceName(inst, "RGMII1")); interfaceNameList.push(getInterfaceName(inst, "RGMII2")); } return interfaceNameList; } function getPeripheralPinNames(inst) { let pinList = []; if (inst.enableTsOut === true) { pinList = pinList.concat( "CPTS0_TS_SYNC"); } if(inst.phyToMacInterfaceMode === "MII") { pinList = pinList.concat( getInterfacePinList(inst, "MDIO"), getInterfacePinList(inst, "MII" ) ); } else if(inst.phyToMacInterfaceMode === "RMII") { pinList = pinList.concat(getInterfacePinList(inst, "MDIO"), getInterfacePinList(inst, "RMII" )); } else { pinList = pinList.concat( getInterfacePinList(inst, "MDIO"), getInterfacePinList(inst, "RGMII" )); } return pinList; } let enet_cpsw_pinmux_module = { displayName: "CPSW pinmux config", longDescription: `This configures CPSW module pinmux`, alwaysShowLongDescription: false, defaultInstanceName: "ENET_CPSW_PINMUX", config: [ { name: "phyToMacInterfaceMode", displayName: "RMII/RGMII/MII", default: "RGMII", options: [ { name: "RMII", }, { name: "RGMII", }, ], }, { name: "enableTsOut", displayName: "Enable CPTS TS Output", default: false, hidden: false, }, ], getInstanceConfig, pinmuxRequirements, getInterfaceNameList, getPeripheralPinNames, }; exports = enet_cpsw_pinmux_module;
This should fix the build error.
Regards,
Shaunak
Hi Shaunak,
Thank for your support and from this solution issue is resolved with EEPROM, but i don't want to use EEPROM. Below is the issue which i am getting
nvoking: Arm Compiler
"C:/ti/ti_cgt_tiarmclang_3.2.2.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -O0 -I"C:/ti/ti_cgt_tiarmclang_3.2.2.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/utils/include" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/core" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/core/include" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/core/include/phy" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/core/include/core" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/hw_include" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/soc/am263x" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/hw_include/mdio/V4" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/lwip/lwip-stack/src/include" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/lwip/lwip-port/include" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/lwip/lwip-port/nortos/include" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/enet/core/lwipif/inc" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/lwip/lwip-stack/contrib" -I"C:/ti/mcu_plus_sdk_am263x_09_02_00_55/source/networking/lwip/lwip-config/am263x/enet" -DSOC_AM263X -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_board_config.d_raw" -MT"syscfg/ti_board_config.o" -I"D:/workspace/AM2634_Drivers/drivers_am263x-cc_r5fss0-0_nortos_ti-arm-clang/Release/syscfg" -o"syscfg/ti_board_config.o" "syscfg/ti_board_config.c"
subdir_rules.mk:46: recipe for target 'syscfg/ti_board_config.o' failed
syscfg/ti_board_config.c:356:32: error: use of undeclared identifier 'CONFIG_I2C1'
I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
^
syscfg/ti_board_config.c:361:41: error: use of undeclared identifier 'CONFIG_I2C1'
status = I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
^
syscfg/ti_board_config.c:368:32: error: use of undeclared identifier 'CONFIG_I2C1'
I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
^
syscfg/ti_board_config.c:372:41: error: use of undeclared identifier 'CONFIG_I2C1'
status = I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
^
syscfg/ti_board_config.c:388:14: warning: call to undeclared function 'EEPROM_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_CTRL_OFFSET, &numMacMax, sizeof(uint8_t));
^
syscfg/ti_board_config.c:388:26: error: use of undeclared identifier 'gEepromHandle'
status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_CTRL_OFFSET, &numMacMax, sizeof(uint8_t));
^
syscfg/ti_board_config.c:388:40: error: use of undeclared identifier 'CONFIG_EEPROM0'
status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_CTRL_OFFSET, &numMacMax, sizeof(uint8_t));
^
syscfg/ti_board_config.c:395:26: error: use of undeclared identifier 'gEepromHandle'
status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_DATA_OFFSET, macAddrBuf, (macAddrCnt * ENET_MAC_ADDR_LEN) );
^
syscfg/ti_board_config.c:395:40: error: use of undeclared identifier 'CONFIG_EEPROM0'
status = EEPROM_read(gEepromHandle[CONFIG_EEPROM0], I2C_EEPROM_MAC_DATA_OFFSET, macAddrBuf, (macAddrCnt * ENET_MAC_ADDR_LEN) );
^
1 warning and 8 errors generated.
gmake: *** [syscfg/ti_board_config.o] Error 1
Building file: "syscfg/ti_board_open_close.c"
Hi Swati,
Can you share your CCS project as a zip file? EEPROM is storing the MAC addresses which will be assigned to the MAC ports. And EEPROM reads are interfaced through I2C. That is the reason the project is expecting you to have EEPROM and I2C instances.
Regards,
Shaunak
Hi Shaunak,
I am trying to share here but it's not allowing me to share zip folder here. Can you suggest me any support Mail I'd
Hi Swati,
You can drag and drop the zip file. If that does not work, you can send an email to shaunak.deshpande@ti.com.
Regards,
Shaunak
Hi Swati,
As mentioned earlier, the EEPROM and I2C is required to read MAC address for your ports. Without this, how to do you exactly plan to assign MAC address?
This requirement is a part of the auto-generated files coming from syscfg (inside the "generated" folder).
To eliminate the use of EEPROM and I2C, you only have the following option:
1.In Enet (CPSW) in syscfg, go to System Integration and choose manual MAC address entry and enter your desired MAC address.
2. Disable the EEPROM and I2C from syscfg.
3. Disable the auto-generation of ti_board_config.c and other files wherever the I2C or EEPROM is referenced. (This is generally not recommended since your other changes in syscfg might not be visible due to disabled auto-generation).
4. From the disabled auto-generated files, remove the references of I2C and EEPROM and make sure the file also gets compiled with your examples (add the file names in makefile).
5.In the function "EnetBoard_getMacAddrList", make the following change:
void EnetBoard_getMacAddrList(uint8_t macAddr[][ENET_MAC_ADDR_LEN], uint32_t maxMacEntries, uint32_t *pAvailMacEntries) { *pAvailMacEntries = 0; }
Also, Swati do you mind sharing what your end-application or product is that involves an AM263x based board? What is the volume of AM263x we are looking at? You can share the block diagrams and the volume details to my email (shaunak.deshpande@ti.com)
Regards,
Shaunak Deshpande
Hi Shaunak,
1.) I want to know from where MAC is Stored in EEPROM
2.) And how many MAC-Address i can assign manually because this evaluation board have 2 Ethernet DP83869 PHY and 1 DP83826
3.) How to edit ti_board_config.c because when i edit this file my changes got vanished while compiling the code
Rest the solution you give i will try and confirm you.
Our plan to release 10k board MCU utilization per annum
Hi Swati,
1. TI MAC addresses are pre-programmed in EEPROM
2. In Syscfg, you can give a list of MAC addresses like this:
3. You need to disable the auto-generation from the right hand side
Our plan to release 10k board MCU utilization per annum
Got it, thanks.
this evaluation board have 2 Ethernet DP83869 PHY and 1 DP83826
Please make sure you get your hardware schematics reviewed from TI experts for ethernet to avoid any issues with those. You can create a new E2E for getting it reviewed. May I know if all these 3 PHYs are connected to CPSW itself?
Regards,
Shaunak
Shaunak Deshpande Said:
May I know if all these 3 PHYs are connected to CPSW itself?
No only 2 ports are connected with CPSW. 3rd one is Ethernet CAT which we are not considering in our project.
As per my understanding MAC should be in MCU itself (Part of hardware), Please confirm MAC address is assigned by the user or by Ti (MCU itself)
Also can you explain me why this function using I2C for MDIO and other pin configuration
static void EnetBoard_setMacPort2IOExpanderCfg(void)
{
I2C_Transaction i2cTransaction;
uint8_t buffer[2];
int32_t status = -1;
I2C_Transaction_init(&i2cTransaction);
i2cTransaction.writeBuf = buffer;
i2cTransaction.writeCount = 2U;
i2cTransaction.targetAddress = IO_EXPANDER_I2C_ADDR;
/* Configure MDIO sel pin */
/* Set output to high */
buffer[0] = IO_EXPANDER_PORT0_OUTPUT_REG + 1; /* Port 1 */
buffer[1] = (0x01 << 4); /* Pin 4 */
I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
/* set pin to output */
buffer[0] = IO_EXPANDER_PORT0_DIR_REG + 1;
buffer[1] = ~(0x1 << 4);
status = I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
DebugP_assert(status == I2C_STS_SUCCESS);
/* Configure RGMII2 sel pin */
/* Set output to low */
buffer[0] = IO_EXPANDER_PORT0_OUTPUT_REG + 0; /* Port 0 */
buffer[1] = ~(0x03 << 2); /* Pin 2 & 3 */
I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
/* set pin to output */
buffer[0] = IO_EXPANDER_PORT0_DIR_REG + 0;
buffer[1] = ~(0x3 << 2);
status = I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);
DebugP_assert(status == I2C_STS_SUCCESS);
}
Hi Swati,
The EEPROM will contain TI MAC address. You can override it and use your own MAC address via either SysCfg or by writing to EEPROM itself. (For quick testing I would recommend using syscfg approach, for production purposes, modifying syscfg for every board uniquely might not be possible).
I2C0 is used to by EEPROM handle to get the list of available MAC addresses, (refer ti_board_open_close.h for more)
I2C1 instance is used to configure MDIO sel pin, setting pins to output (refer EnetBoard_setMacPort2IOExpanderCfg() in generated/ti_board_config.c for more)
Regards,
Shaunak
Hi Shaunak,
As per your confirmation, it's conclude that MAC address is not part of the MCU (AM2634) as happen with network IC's
Hi Swati,
MAC address is a part of the MCU.
1. One MAC address is stored in eFuse register which cannot be overwritten.
2. A list of MAC addresses is also stored in EEPROM which is read at run-time.
3. In-case you do not wish to use these MAC addresses, you can manually overwrite the EEPROM list of MAC addresses OR use syscfg to give custom MAC addresses.
Regards,
Shaunak
1. Can you please help me to read the eFuse register Data, because our plan is to use Hardware MAC address in our application
2. And also can you please provide me the details like How many MAC address stored in eFuse by-default because we have 3 ethernet port in our evaluation board
Hi Swati,
The TI drivers already read the MAC address from eFuse register. The eFuse contains only 1 MAC address. The rest are stored in EEPROM.
For example, if you have MAC port-1 and MAC port-2 enabled, then 1 MAC address is read from the eFuse and the other is read from EEPROM.
Best regards,
Shaunak
Hi Shaunak,
1.) I configured 2 MAC address by syscnfg and i am getting same MAC address in debugging (Means MAC read from eFuse are overwrittern by MAC generated of sysconfg)
2.) If i want to assign single MAC i am getting invalid MAC address list in syscnfg
Hi Swati,
1. The MACs are different in the screenshot you attached. 1st one ends in f2 and the second in e3. I will check this internally once with the team.
2.Yes, the Syscfg right now does not support giving only one MAC.
Regards,
Shaunak
Hi Swati,
To assign your MAC addresses, you can overwrite the MACs in your custom-board config file. When you select the custom board in syscfg (Enet CPSW), you will have to write a custom board.c file. The ti_board_config.c is not generated. You can first generate this file (marking the board not as a custom board). Have a look at the functions in this file, copy paste the required functions in your custom board config file.
In this file, the function "EnetBoard_getMacAddrList" can be used to return your MAC addresses.
Regards,
Shaunak