AM2432: ENET CPSW Mac Addresses behavior

Part Number: AM2432

Hi, 

I am using AM2432 with the Industrial SDK 11.00.00.08.

Our project involves using ENET with CPSW in Switch Mode, so I would expect to have one internal host port and the two external ports. Only core R5FSS0-0 will use it.

I want to implement a custom way to assign MAC addresses to the device, so I made sure to:

  • skip reading MAC addresses from the EFUSEs, by adding a new flag SkipEFUSESMacAddr in enet_cpsw_am64x_am243x.syscfg.js and modifying enet_soc_cfg.c.xdt.
  • skip reading from the EEPROM, that is not used our board, by modifying ethphy_cpsw_board_cfg.c.xdt. Instead, read the MAC addresses from a buffer declared as extern
  • Now I declare a buffer as uint8_t macAddrBuf[3 * ENET_MAC_ADDR_LEN] = {0xAC, 0xD3, 0x64, 0x00, 0x00, 0x00, 0xAC, 0xD3, 0x64, 0x00, 0x00, 0x01, 0xAC, 0xD3, 0x64, 0x00, 0x00, 0x02};

Everything is working correctly, and I can see the MAC addresses I declared being added to the queue.
Since I have two physical ports plus the switch port (as in AM243x Launchpad and not as in AM243x EVM), I’ve only entered three MAC addresses, but when I run, I get this message:

EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 3 

Why does this happen? How many MAC addresses does a custom board with ENET with CPSW in Switch mode actually need? 

And, since we'll be using ENET with CPSW with Dual MAC mode on other projects, how many MAC addresses would I need in that other case?

Thank you,

Best Regards,

Andrea

  • Hi,


    are there any updates?


    I noticed that the output from this example shows the same message. So why are 4 MAC Addresses required by default? What is the minimum number of MAC addresses, and how are the 4 values supposed to be used?

    Thank you,

    Best Regards,

    Andrea

  • Hi Andrea,

    The number of expected mac address is controlled by the macro "ENET_CFG_RM_MAC_ADDR_MAX" from the Enet driver. This was set to 4 since the initial batch of boards came with multiple MAC addresses. The maximum number of MAC addresses needed for AM243x if you are using any one instance of CPSW or ICSS is 3. If you are using both instances of ICSSG or using a combination of ICSSM with CPSW/ICSSG, then the requirement would vary depending upon the application. 

    The minimum number required will be one MAC address per CPSW/ICSSG instance. So, if you are using only CPSW in Switch mode, then you would need 1 MAC address. If it is in MAC-only mode, you would need 2 MAC addresses. Most of the use cases will be covered with 3 MAC addresses that TI provides with am243x devices. 

    For your usecase, you would need only 2 MAC addresses if you are not using gPTP, and 3 MAC addresses if gPTP is needed.

    Thanks and Regards,
    Teja.

  • Hi Teja,

    thank you for your reply.

    So, in my case (one instance of CPSW, gPTP not used) the number of MAC addresses is 1 for Switch Mode and 2 for MAC-only Mode.

    In a Profinet project I worked on, I used ICSSG in Switch Mode and only one MAC address, but then the Profinet stack generated two more by adding +1 and +2, so in the end the actual number of MAC addresses used was no longer 1 but 3. Do you think this behavior is specific to Profinet? Or could CPSW also implement a similar mechanism internally that I should take into account?

    I'm asking this because I need to decide how many of my company's MAC addresses to assign to each of our custom boards, and I want to make sure to allocate the exact number of MAC addresses to each board.

    Thank you,

    Best Regards,

    Andrea

  • Hi Andrea,

    The behaviour you mentioned is specific to profinet, and would not be seen with CPSW. If you can specify what is the application you are planning to use, I can tell you with certainty how many MAC addresses would be needed. If you are going to use CPSW only in switch mode, with no intention of having MAC-only mode in future, then 1 mac address would be sufficient. 

    In case you have future plans to expand the device's capabilities and deploy TSN networks, then 3 MAC addresses are preferable. You can reach out to us if you need any further clarifications. 

    Thanks and regards,
    Teja.