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.

MCU-PLUS-SDK-AM263X: MCU-PLUS-SDK-AM263X

Part Number: MCU-PLUS-SDK-AM263X
Other Parts Discussed in Thread: AM2634, AM2434

Tool/software:

Hi all
I'm  testing  CPSW peripheral on LP_AM2634  board using MCU_SDK_10_00_00_31.

I'm able to open the driver correctly and TX/RX frame from/to a Windows PC.


But I have some question open.

1) How can I get the speed of the link and the  duplexity from the driver.? I  expect  a speed of 100Mb but the routine I wrote  give me only  2Mb

2) What is the correct  way to configure CPSW to have a PHY connection towards the eaternal  world on one port and a MAC connections internally to the same demo board using SysCfg? Do this configuration supported by AM2434 and by SysCfg?

3) An architecture  similar to the following is feasible? If yes I need  two  R5F core so do I need a system project?

PHY0<-->CPSW0<-->MAC0 <---> MAC1<-->CPSW1<--> PHY1

                    |                                                        |

                R5F00                                                 R5F10

Thanks in advanced

Best regards

M

  • Hello,

    1. Are you using a specific example from the SDK? Can you share your current configuration/routine?
    2. I am not sure about AM243x devices, as that device family uses a different type of CPSW peripheral, but for AM263x, it is possible to configure the first MAC port connected to a PHY and the second MAC port connected to NO-PHY (MAC2MAC). I am checking to see if the functionality of this set up has been tested before. To configure the second MAC port, please go to the CPSW peripheral, enable MAC Port 2 under MAC Port Config, and set up according to this: https://dev.ti.com/tirex/explore/content/mcu_plus_sdk_am263x_10_01_00_31/docs/api_guide_am263x/enet_mac2mac_top.html 

    3. Can you explain your intended configuration here? AM26x devices only have 1 instance of the CPSW peripheral (CPSW0) with 2 MAC ports and one internal host port. The internal host port can transfer packets between both MAC ports. 

    Regards,
    Susan

  • Hi Susan

    1. I'm using both LP_AM2434 and LP_AM2634 demo board  but coused by  some programming error  found on LP_AM2434 now we put our attention only on LP_AM263x board. We need a  switch so I test the example in the networking  folder:

    -  mcu_sdk_am263x\mcu_plus_sdk_am263x_10_00_00_35\examples\networking\enet_layer2_cpsw_switch  (SWITCH)

    - mcu_sdk_am263x\mcu_plus_sdk_am263x_10_00_00_35\examples\networking\enet_layer2_cpsw (some test on  single MAC)

    In the fallowing the code I add to the EnetApp_waitForLinkUp() function un file l2_cpsw_cfg.c to read the speed from the driver. It return 2Mb in any  test conditions so I think I wrong something. I attached the config function:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    int32_t EnetApp_waitForLinkUp(EnetApp_PerCtxt *perCtxt)
    {
    Enet_IoctlPrms prms;
    Enet_MacPort macPort;
    EnetMacPort_LinkCfg linkCfg;
    bool linked;
    uint32_t i;
    int32_t status = ENET_SOK;
    printf("%s: Waiting for link up...\r\n", perCtxt->name);
    for (i = 0U; i < perCtxt->macPortNum; i++)
    {
    macPort = perCtxt->macPort[i];
    linked = false;
    while (!linked)
    {
    ENET_IOCTL_SET_INOUT_ARGS(&prms, &macPort, &linked);
    ENET_IOCTL(perCtxt->hEnet, gEnetApp.coreId, ENET_PER_IOCTL_IS_PORT_LINK_UP, &prms, status);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    2. OK thanks for all. No problem I made test using LP_AM2634. If you find an example already tested please send me an attach if it is possible.

    3. I wold like to share a document to explain better  aur architecture ides.  Is there a way to attached a pdf or a docx file? In this way I can share with you aur needs. Keep me informed otherwise I try to attach an image but  is better a complete document.

    Thank for all

    M

  • Hi Susan

    I try to made 3 picture regarding the actual configuration and the new architecture we are try to implement.

    Figure Actual_archit.png show thwe actual  hardware  arrangement.The system architecture is composed by one  master and up to three  slaves. Each  node  (Master or Slave unit in figure ) hosts two microcontrollers: working (µCW) and protecting (µCP). Both microcontrollers work in parallel processing the same input data (distance measures).

    Each unit in the  system (Master and Slaves) scans a portion of area of 270°  to detect whether there is an object in dangerous predefined areas (user-programmed by the GUI). All devices in the system implement these functionalities regardless of the kind of device (master or slave).

    Furthermore the master is the only node that interacts with the outside network during operations, to provide to an external device (PC)  distance information. More specifically, only the working microcontroller of master unit  (µCWM)  performs this job.

    All  slaves scan their area portion, process their measured distances and send their data  to the master. The master  collects the results, analyzes them and drives the outputs  accordingly. Thus, the master has a dual role: distance sensor of its area and outputs actuator for all  devices in the network.

    Figure archit_1.png show our idea using Texas Sitara MPU with 2 unit of CPSW if available.

    In this way we have some important advantages:

    - only a MPU to perform the complete design for a unit ( both master or slave)

    - no need for external switch

    - 2 more core for extra operation.

    This design need a way to certificate the unit as SIL2 CAT3 HFT1

    Figure archit_2.png show our idea using Texas Sitara MPU with 1 unit of CPSW . In this way we replicate the actual configuration with 2 separate channel into  the unit (master or sslave unit). As in the actual configuration we have to duplicate the hardware request but we avoid the need for 2 CPSW unit on a MPU. As you can see we need the MAC to PHY connection and the MAC to MAC connection to complete the chain.

    In this way we have some important advantages:

    - no need for external switch

    - 2 more core for extra operation.

    This design need a way to certificate the unit as SIL2 CAT3 HFT1 but in this case we have 2  physical different MPU as in the actual desigm.

    I can share same more detailed documentation but I need to understand the way to attach pdf files.

    Thanks for all

    M

  • Hi Susan

    regardind question 2.

    2. ........ To configure the second MAC port, please go to the CPSW peripheral, enable MAC Port 2 under MAC Port Config, and set up according to this: https://dev.ti.com/tirex/explore/content/mcu_plus_sdk_am263x_10_01_00_31/docs/api_guide_am263x/enet_mac2mac_top.html 

    The link provide a configuration page that come out from the last  MCU_SDK_10_01_00_31. Unfortunaly this  MCU_SDK provide only the networking example icss_emac_lwip not so usefull for our purpose.

    The previous MCU_plus_SDK_10_00_00_35 show a different configuration page where Port1 PHY Configuration is different. The following image show the same context for the 2 MCU_SDK:

     

    At the moment I'm using MCU_SDK_10_00_00_21 and if I compile setting the last SDK in the CCD--> PRODUCT I have some compiler error thet disappear  setting the previous SDK.

    This is for a complete answer to your suggestion.

    Best regards

    M

  • Hello,

    To answer some quick questions:
    To upload a PDF/document in e2e, please go to Insert -> Image/Video/file -> select Upload and select your PDF:

    For MCU_SDK_10_01_00_31: All networking examples for CPSW are under: mcu_plus_sdk_am263px_10_01_00_31\source\networking\enet\core\examples

    I'll be looking into the rest of this tomorrow and hopefully will be able to answer the rest of your questions.


    Thank you,

    Susan

  • Hi Susan

    Thank now I can upload some more detailed document about the actual laser safety scanner architecture.LS_architecture.rar

    For the MCU_SDK networking example I lose the change of the PATH in the newest SDK.

    I'm waiting for the rest

    thanks of all

    M

  • Hello,

    Apologies for the delay here, I wanted to sit down and really look into what you aiming for here. 
    Starting out, the CPSW peripheral has 3 modes of operation: switch mode (default), mac mode, and dual mac mode.

    In switch mode, the CPSW peripheral functions like a 2 port switch and received packets are forwarded to the Internal Host port and the MAC ports. As such, you could do a daisy chain like this:

    In this setup, there is one MAC address per AM263x device (assigned to the Host port).

    In MAC mode, only one port is enabled and packets are only forwarded to the host. The MAC port itself would have an address.

    Dual MAC mode enables both ports in MAC mode and uses two network interfaces that act as independent network devices:

    Dual MAC mode uses shared buffers, memory pools, and drivers to emulate having 2 host ports. 

    Looking at the provided architecture, I have a few ideas for your individual units:

    • Using CPSW in switch mode with multiple channels of TX/RX and a single MCU per unit
    • Using CPSW in DUAL MAC mode with multiple channels of TX/RX and a single MCU per unit
    • Using 2x MCUs with the CPSW in either switch or DUAL MAC mode and 1x TX/RX with MAC2MAC connection

    Granted, while I was able to test using multiple EVMs in a CPSW switch based daisy chain for this, I wasn't entirely sure if the using multiple TX/RX channels would work for your safety purposes. I recommend checking out the Enet Layer 2 Multichannel example for that. 

    An additional example I think would be useful for you to look at is the Enet layer 2 CPSW Fast Startup example. This is the closest example to a DUAL MAC mode CPSW that I know of in our SDK. It is also a NORTOS example. Unfortunately it's for our Control Card EVM, but I think looking through the example html would be useful because it goes into tips on minimizing link up time for Ethernet applications.

    This was a question in your report, but as for connecting PRU-ICSS and CPSW, I know it is possible via a software bridge, but I do not have the full details of that implementation. That would be a separate topic altogether.

    Would any of the above configurations work for your needs?

    Regards, 

    Susan

  • Hi Susan

    thanks for your reply.

    My initial idea was to use  one microcontroller unit with 2 separate CPSW. In this way I'm able to replicate the actual configuration (see Ls_architecture.rar) previously attached.

    The first idea look like this.

    But if not exists microcontroller with two separare CPSW unit I think the best options could be using 2x MCUs with the CPSW in eswitch  mode and 1x TX/RX with MAC2MAC connection as you suggest in the email.

    The architecture could be the folloeing:

    But can you suggest me an example to connect two microcontroller AM2634  with a MAC2MAC for internal port and the 2 external PHY port? In the MCU SDK  I found example for the connection of one CPSW with 2 externel PHY port but I not able to see the architecture you suggest to us.

    Regarding the use of PRU-ICSSG we can keep the topic separete.

    Thanks for all Susan

    M

  • Hello,

    Apologies for the delay. We do not currently have an example for MAC2MAC connections because our EVMs aren't really designed to support it.
    I am currently working on creating an example for you to use, and hope to have it ready for later today. 

    Regards,

    Susan

  • Ciao Susan

    thanks for all

    Perfect from my side.  i'm aiting for your suggestions.

    Actually I'm dealing with multiple different designs so one day or more for your consideration are not an issue.

    Thanks for all susan

    best regards

    M

  • Hi Susan

    have you some news regarding the problem?

    Thanks for all

    M

  • Hi Susan

    have you find some big issue regarding my proposal design?

    Have yiu some news regarding the design involved?

    If yes please keep me informed

    Thanks for all

    Best regards

    M