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.

RTOS/AM5728: MRP feature of PROFINET by using 2 port EMAC Switch of AM57xx

Part Number: AM5728

Tool/software: TI-RTOS

Hi,

 

My customer is considering to implement PROFINET by using PRU 2port EMAC Switch of AM57xx. In order to implement MRP (Media Redundancy Protocol) feature of PROFINET, the following functions should be supported.

------------------------------------

The driver needs at least the following functionalities:

  • Sending telegrams on a specific port (e.g. by tail-tagging)

  • Determining the port on which a telegram has been received (e.g. by tail-tagging)

  • Get the link state of each port

     

    In addition, the driver needs the following functionalities to support a MRP Client:

  • Set the MAU type to 100Mbit/full duplex

  • Add a static MAC address to the filtering data base (FDB) of the switch

  • Delete the filtering data base of the switch

     

    In addition, the driver needs the following functionalities to support a MRP Manager:

  • Set the port state to enable, disable, blocked or forward

  • Get the current port state

-----------------------

 

Can PRU 2 port EMAC SW support the above functions ? I think it can support them, but correct ?

 

Thanks and regards,
Hideaki


  • Hi Hideaki,

    Yes, all of these functions are supported in PRU-ICSS Profinet SW, below are the related APIs:

    PN_OS_txPacket()
    PN_RxPktGet(), PN_RxPktInfo()
    PN_GetLinkStatus()

    PN_setStaticFilterTable()
    PN_purgeTable()

    PN_MRP_setPortState()
    PN_MRP_getPortState()

    More details of the APIs please check ti/PRU-ICSS-Profinet_Slave_01.00.03.00/protocols/profinet_slave/docs/doxygen/html/globals_func_p.html#index_p, for example:

    int32_t PN_MRP_setPortState    (    ICSS_EmacBaseAddressHandle_T     ICSS_EmacBaseAddressHandle,
    uint8_t     portNumber,
    uint8_t     pState
    )        
    API to set the MRP state for a port.

    Parameters
    [in]    ICSS_EmacBaseAddressHandle    ICSS Emac LLD HW attrs
    [in]    portNumber    Port for which MRP state has to be configured
    ICSS_EMAC_PORT_1 (1)
    ICSS_EMAC_PORT_2 (2)
    [in]    pState    There are three valid values of the MRP port state
    DISABLED
    BLOCKING
    FORWARDING
    Return values
    0    on success

    Regards,

    Garrett

  • Hi Garrett,

    Thank you for your reply.  Sorry, I misclicked on RESOLVED. They want to develop PROFINET Master by using PRU-ICSS Dual EMAC Switch by themselves without PRU-ICSS Industrial SW of PROFINET Slave.

    Again, Can PRU-ICSS Dual EMAC Switch firmware (not PRU PROFINET Slave SW) support the below functions ? I think it can support them, correct ?

    ------------------------------------

    The driver needs at least the following functionalities:

    • Sending telegrams on a specific port (e.g. by tail-tagging)

    • Determining the port on which a telegram has been received (e.g. by tail-tagging)

    • Get the link state of each port

       

      In addition, the driver needs the following functionalities to support a MRP Client:

    • Set the MAU type to 100Mbit/full duplex

    • Add a static MAC address to the filtering data base (FDB) of the switch

    • Delete the filtering data base of the switch

       

      In addition, the driver needs the following functionalities to support a MRP Manager:

    • Set the port state to enable, disable, blocked or forward

    • Get the current port state

    -----------------------

     Thanks and regards,
    Hideaki

  • Hideaki,

    The details of PRU-ICSS Dual EMAC Switch firmware is described in and the firmware source code is available at PDK drv\icss_emac\firmware\icss_switch.

    Most of the functionalities listed above for Profinet master are directly supported by the firmware/driver APIs as you can see in the Wiki.

    "Set the port state to enable, disable, blocked or forward', should be able to support by enabling and configuring storm prevention properly with ICSS_EMAC_IOCTL_STORM_PREV_CTRL and ICSS_EMAC_IOCTL_PORT_CTRL.

    Regards,

    Garrett