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.

AM2432: MII / RGMII for industrial communication, and RMII / RGMII for cpsw

Part Number: AM2432

Hi Expert,

I would like to confirm with you about Ethernet communication I/F.

  • MII / RGMII is available for industrial communication (ICSS-EMAC)
  • RMII / RGMII is available for common platform ethernet switch (CPSW)

Is this correct? if yes, could you share the reason why RMII cannot be used for ICSS-EMAC and also MII cannot be used for CPSW?

For our product running 3rd party Ethernet/Ip feature on top of Lwip, we got confirmation from TI that we have to choose ICSS-EMAC but not CPSW. 

So, for HW design, we have to decide very soon whether MII or RMII or RGMII is correct for Ethernet I/F in our product.

  • MII or RGMII for ICSS-EMAC?
  • how about RMII for ICSS-EMAC?

Please share your guide on our choice. I would appreciate it if you share further knowledge on this topic. 

Best,

Moonil

  • Hi

    • MII / RGMII is available for industrial communication (ICSS-EMAC)

    Yes, this is correct. RMII can not be used for ICSS-EMAC because PRU-ICSS HW only supports MII and RGMII.

    So, for HW design, we have to decide very soon whether MII or RMII or RGMII is correct for Ethernet I/F in our product.

    It will be your decision on which interface to select. MII will be cheaper and lower latency compared to RGMII.

    Regards
    Dhaval Khandla

  • Hi Dhaval Khandla,

    Thank you for your prompt clarification. 

    so, our decision will be, 

    • enable ICSS-EMAC + Switch Mode + MII (2 ports)
    • run 3rd party Ethernet/IP (not KUMBUS) on Lwip
    • run standard TCP/IP applications on Lwip like TFTP or HTTP server
    • PRU firmware?

    one remaining question is, which PRU firmware binary should be loaded on PRU for our product?

    I found PRU0_FIRMWARE[] in "icss_prp_pru0_bin.h", "ethernetip_adapter_pru0_bin.h" and other in SDK.

    Should we use the one in "ethernetip_adapter_pru0_bin.h" even though we are not using KUNBUS stack for ethernet IP?

    I would appreciate it if you share a guide/example to load/use the PRU firmware, and any precautions.

    Regards,

    Moonil

  • Hi

    one remaining question is, which PRU firmware binary should be loaded on PRU for our product?

    Please look at following page in documentation for details on EtherNet/IP Firmware: 

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_02_00_31/exports/docs/api_guide_am243x/ETHERNETIP_ADAPTER_FWHAL.html

    EtherNet/IP Adapter FWHAL(Firmware and Hardware Abstraction Layer) allows loading and running EtherNet/IP firmware and acts as an interface with the firmware. FWHAL implements the key interface between EtherNet/IP Adapter firmware and EtherNet/IP Adapter stack. FWHAL is independent of any specific stack.

    EIP_drvInit API will load the appropriate firmware on PRU cores.

    Regards
    Dhaval Khandla

  • Hi Dhaval Khandla,

    Thank you for the information. I wonder if there is an example code to use "EtherNet/IP Adapter FWHAL".

    When I checked SDK examples, I found only an example of KUNBUS Ethernet/IP but the codes using the FWHAL like EIP_drvInit API seem to be hidden inside their library.

    Can you share an example project to use "EtherNet/IP Adapter FWHAL" including creating EIP_Handle? It would be very helpful for me to expedite progress to porting our custom Ethernet/IP Adapter.

    Regards,

    Moonil

  • Hi Dhaval, 

     

    EIP_drvInit API will load the appropriate firmware on PRU cores.

    To use EIP APIs, EIP_Handle is required as its parameter and it is a pointer type of the struct below. 

    In my understanding, EIP_Handle should be filled out before calling EIP_drvInit(). correct?

    if yes, can I use the same code of hsr_prp example for pruicssHandleemacHandle, and timeSyncHandle of this struct?

    How about other parts like cipSyncObj and dlrHandle?

    typedef struct cipSyncObj
    {
            PRUICSS_Handle pruicssHandle;
            ICSS_EMAC_Handle emacHandle;
            TimeSync_ParamsHandle_t timeSyncHandle;
            cipSyncConfig_t cipSyncObj;
            /**Temporary placeholder to copy packets*/
            uint8_t tempFrame[ICSS_EMAC_MAXMTU];
            EIP_DLRHandle dlrHandle;
    } eip_Config;

    Could you share a guide in more detail? If you share an example code to initialize those fields of this struct, it would be very helpful to me.

    Regards,

    Moonil

  • Hi Dhaval,

    Can I ask you for any updates on my questions and some examples of how to use EIP APIs?

    Regards,

    Moonil

  • Hi
    You can follow this sequence

    In my understanding, EIP_Handle should be filled out before calling EIP_drvInit(). correct?

    if yes, can I use the same code of hsr_prp example for pruicssHandleemacHandle, and timeSyncHandle of this struct?

    1. Initialize PRU-ICSS Handle. See https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_02_00_31/exports/docs/api_guide_am243x/DRIVERS_PRUICSS_PAGE.html#autotoc_md585 for details
    2. Initialize ICSS-EMAC Handle. See https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_02_00_31/exports/docs/api_guide_am243x/ICSS_EMAC.html#autotoc_md772 for details
    3. Initialize TimeSync Handle
      1. Allocate memory for TimeSync_ParamsHandle_t
      2. Fill the values inside handle. You can refer PRP example but it can not be used as it is. Some values will be different like timeSyncConfig.type will be E2E instead of PTP, timeSyncConfig.protocol will be UDP_IPV4, timeSyncConfig.custom_tx_api will be 0.
    4. Initialize DLR Handle
      1. Allocate memory for handle
      2. Fill the values inside handle. Set PRU-ICSS and ICSS-EMAC handles. Allocate memory for dlrObj
    5. Initialize EIP FWHAL Handle
      1. Allocate memory for handle
      2. Fill the values inside handle. Set DLR, PRU-ICSS and ICSS-EMAC handles
    6. Call EIP_drvInit and EIP_drvStart

    Regards
    Dhaval

  • Hi Dhaval,

    Thank you for your kind explanation.

    I have a quick question from a bit different angle regarding PRU firmware.

    As we discussed in the meeting before, you may remember that a custom EIP stack on top of Lwip will run in our product. This custom stack will not use any APIs or features provided by TI EIP PRU firmware, and it will use only Lwip APIs.

    So, I was wondering if there is a simpler way which we can implement to use the Ethernet network ports (2 port switch mode) if only Lwip is used but EIP features from TI are not used. In this case, do you think that we still need to implement the same steps you described? Or can we skip some steps like TimeSync or DLR for our case?

    I also wonder if there is a way even not to use PRU firmware for ethernet communication.

    I would appreciate it if you share your experience and guide on this again.

    Best,

    Moonil

     

  • Hi Moonil,

    Apologies, this thread got dropped from us.

    Please let us know if you are still looking for the information? Let us know and we will get back to you.

    Thanks for your understanding.

    Regards,

    Prasad

  • Hi

    So, I was wondering if there is a simpler way which we can implement to use the Ethernet network ports (2 port switch mode) if only Lwip is used but EIP features from TI are not used. In this case, do you think that we still need to implement the same steps you described? Or can we skip some steps like TimeSync or DLR for our case?

    As mentioned in https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_04_00_17/exports/docs/api_guide_am243x/ETHERNETIP_ADAPTER_FWHAL.html, PRU-ICSS implements the data link layer for EtherNet/IP. It will also do DLR and PTP specific handling. 

    I also wonder if there is a way even not to use PRU firmware for ethernet communication.

    There are advantages of using PRU-ICSS for Industrial Protocols:

    1. Better cut-through latency 
    2. Certified solution in SDK
    3. DLR and PTP support

    Regards
    Dhaval