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: Unable to ping with ICSSG0 when using ICSS-EMAC

Part Number: AM2432
Other Parts Discussed in Thread: TMDS243EVM, DP83826E, DP83869, TPIC2810, TCA6424

Hello,
I am using the evaluation board "TMDS243EVM - PROC101C (005)" to use the ICSS-EMAC layer by using the sample "hsr_mii_demo_am243x-evm_r5fss0-0_freertos_ti-arm-clang" (This sample is using ICSSG1).

My goal is to see if the board is able to reply to a ping.

- Everything is ok, ping is working fine.

We are developing a new board that is using ICSSG0 (instead of ICSSG1).

To test it, I changed ICSSG1 to IGSSG0 in .syscfg file but I am not able to ping it.

Do we need to change the PRU firmware to make it working or there is something else I missed?

Best regards

  • Hi  

    Thanks for your query,

    I would need more info here:

    1. Which phy are using, have you configured them in your application

    2. Is your application building properly?

  • Hi,
    We are using a DP83826E. I tested by using the loopback Far-End (Reverse) Loopback feature and I see packets.
    The PHY used returns a link up.

    My application builds correctly.

    The configuration of the PHYs is made by using ETHPHY Device "CUSTOM"; Custom Device Name "DP83826E" in syscfg.
    I checked PHYs IDS (and link status when cable is plugged or not).

    Here is the generated .syscfg file

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "AM243x_ALV_beta" --package "ALV" --part "ALV" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@08.06.00"
     * @versions {"tool":"1.16.1+2960"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const pruicss    = scripting.addModule("/drivers/pruicss/pruicss", {}, false);
    const pruicss1   = pruicss.addInstance();
    const uart       = scripting.addModule("/drivers/uart/uart", {}, false);
    const uart1      = uart.addInstance();
    const udma       = scripting.addModule("/drivers/udma/udma", {}, false);
    const udma1      = udma.addInstance();
    const udma2      = udma.addInstance();
    const hsr_prp    = scripting.addModule("/industrial_comms/hsr_prp/hsr_prp", {}, false);
    const hsr_prp1   = hsr_prp.addInstance();
    const debug_log  = scripting.addModule("/kernel/dpl/debug_log");
    const mpu_armv7  = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    const mpu_armv71 = mpu_armv7.addInstance();
    const mpu_armv72 = mpu_armv7.addInstance();
    const mpu_armv73 = mpu_armv7.addInstance();
    const mpu_armv74 = mpu_armv7.addInstance();
    const mpu_armv75 = mpu_armv7.addInstance();
    const mpu_armv76 = mpu_armv7.addInstance();
    const mpu_armv77 = mpu_armv7.addInstance();
    const mpu_armv78 = mpu_armv7.addInstance();
    const timer      = scripting.addModule("/kernel/dpl/timer", {}, false);
    const timer1     = timer.addInstance();
    const timer2     = timer.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    uart1.$name        = "CONFIG_UART0";
    uart1.UART.$assign = "USART0";
    
    udma1.$name    = "CONFIG_UDMA0";
    udma1.instance = "PKTDMA_0";
    
    udma2.$name = "CONFIG_UDMA1";
    
    hsr_prp1.$name                                = "CONFIG_HSR_PRP0";
    hsr_prp1.instance                             = "ICSSG0";
    hsr_prp1.phyAddr0                             = 0;
    hsr_prp1.phyAddr1                             = 2;
    hsr_prp1.icss_emac[0].$name                   = "CONFIG_ICSS_EMAC0";
    hsr_prp1.icss_emac[0].mode                    = scripting.forceWrite("SWITCH");
    hsr_prp1.icss_emac[0].phyToMacInterfaceMode   = scripting.forceWrite("MII");
    hsr_prp1.icss_emac[0].linkTaskPriority        = 12;
    hsr_prp1.icss_emac[0].txTaskPriority          = 10;
    hsr_prp1.icss_emac[0].splitQueue              = true;
    hsr_prp1.icss_emac[0].learningEnable          = true;
    hsr_prp1.icss_emac[0].halfDuplexEnable        = true;
    hsr_prp1.icss_emac[0].queue                   = "QUEUE2";
    hsr_prp1.icss_emac[0].rxTaskPriority          = 30;
    hsr_prp1.ethphy1[0].$name                     = "CONFIG_ETHPHY0";
    hsr_prp1.ethphy1[0].mdioManualModeLinkPolling = scripting.forceWrite("Polling");
    hsr_prp1.ethphy1[0].name                      = "CUSTOM";
    hsr_prp1.ethphy1[0].customDeviceName          = "DP83826E";
    hsr_prp1.ethphy2[0].$name                     = "CONFIG_ETHPHY1";
    hsr_prp1.ethphy2[0].mdioManualModeLinkPolling = scripting.forceWrite("Polling");
    hsr_prp1.ethphy2[0].name                      = "CUSTOM";
    hsr_prp1.ethphy2[0].customDeviceName          = "DP83826E";
    hsr_prp1.PRU_ICSSG0_MDIO.$assign              = "PRU_ICSSG0_MDIO0";
    hsr_prp1.PRU_ICSSG0_IEP.EDC_LATCH_IN0.$used   = false;
    hsr_prp1.PRU_ICSSG0_IEP.EDC_SYNC_OUT0.$used   = false;
    
    pruicss1.$name                           = "CONFIG_PRU_ICSS0";
    hsr_prp1.icss                            = pruicss1;
    pruicss1.AdditionalICSSSettings[0].$name = "CONFIG_PRU_ICSS_IO0";
    
    mpu_armv71.$name             = "CONFIG_MPU_REGION0";
    mpu_armv71.size              = 31;
    mpu_armv71.attributes        = "Device";
    mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv71.allowExecute      = false;
    
    mpu_armv72.$name             = "CONFIG_MPU_REGION1";
    mpu_armv72.size              = 15;
    mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv73.$name             = "CONFIG_MPU_REGION2";
    mpu_armv73.baseAddr          = 0x41010000;
    mpu_armv73.size              = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv74.$name             = "CONFIG_MPU_REGION3";
    mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv74.baseAddr          = 0x70000000;
    mpu_armv74.size              = 21;
    
    mpu_armv75.$name             = "CONFIG_MPU_REGION4";
    mpu_armv75.baseAddr          = 0x60000000;
    mpu_armv75.size              = 28;
    mpu_armv75.accessPermissions = "Supervisor RD, User RD";
    
    mpu_armv76.$name    = "CONFIG_MPU_REGION5";
    mpu_armv76.baseAddr = 0x80000000;
    mpu_armv76.size     = 31;
    
    mpu_armv77.$name      = "CONFIG_MPU_REGION6";
    mpu_armv77.baseAddr   = 0x70000000;
    mpu_armv77.size       = 16;
    mpu_armv77.attributes = "Cached+Sharable";
    
    mpu_armv78.$name        = "CONFIG_MPU_REGION7";
    mpu_armv78.size         = 16;
    mpu_armv78.baseAddr     = 0x701D0000;
    mpu_armv78.allowExecute = false;
    mpu_armv78.attributes   = "NonCached";
    
    timer1.$name         = "CONFIG_TIMER0";
    timer1.timerCallback = "Timer0_Isr_Handle";
    timer1.TIMER.$assign = "DMTIMER0";
    
    timer2.$name         = "CONFIG_TIMER1";
    timer2.timerCallback = "Timer1_Isr_Handle";
    timer2.TIMER.$assign = "DMTIMER1";
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    uart1.UART.RXD.$suggestSolution                           = "UART0_RXD";
    uart1.UART.TXD.$suggestSolution                           = "UART0_TXD";
    hsr_prp1.PRU_ICSSG0_MDIO.MDC.$suggestSolution             = "PRG0_MDIO0_MDC";
    hsr_prp1.PRU_ICSSG0_MDIO.MDIO.$suggestSolution            = "PRG0_MDIO0_MDIO";
    hsr_prp1.PRU_ICSSG0_IEP.$suggestSolution                  = "PRU_ICSSG0_IEP0";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.$suggestSolution             = "PRU_ICSSG0_MII_G_RT";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_RXD0.$suggestSolution   = "PRG0_PRU0_GPO0";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_RXD1.$suggestSolution   = "PRG0_PRU0_GPO1";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_RXD2.$suggestSolution   = "PRG0_PRU0_GPO2";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_RXD3.$suggestSolution   = "PRG0_PRU0_GPO3";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_RXDV.$suggestSolution   = "PRG0_PRU0_GPO4";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_RXER.$suggestSolution   = "PRG0_PRU0_GPO5";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_TXD0.$suggestSolution   = "PRG0_PRU0_GPO11";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_TXD1.$suggestSolution   = "PRG0_PRU0_GPO12";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_TXD2.$suggestSolution   = "PRG0_PRU0_GPO13";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_TXD3.$suggestSolution   = "PRG0_PRU0_GPO14";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII0_TXEN.$suggestSolution   = "PRG0_PRU0_GPO15";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_RXD0.$suggestSolution   = "PRG0_PRU1_GPO0";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_RXD1.$suggestSolution   = "PRG0_PRU1_GPO1";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_RXD2.$suggestSolution   = "PRG0_PRU1_GPO2";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_RXD3.$suggestSolution   = "PRG0_PRU1_GPO3";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_RXDV.$suggestSolution   = "PRG0_PRU1_GPO4";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_RXER.$suggestSolution   = "PRG0_PRU1_GPO5";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_TXD0.$suggestSolution   = "PRG0_PRU1_GPO11";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_TXD1.$suggestSolution   = "PRG0_PRU1_GPO12";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_TXD2.$suggestSolution   = "PRG0_PRU1_GPO13";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_TXD3.$suggestSolution   = "PRG0_PRU1_GPO14";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII1_TXEN.$suggestSolution   = "PRG0_PRU1_GPO15";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII_MR0_CLK.$suggestSolution = "PRG0_PRU0_GPO6";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII_MR1_CLK.$suggestSolution = "PRG0_PRU1_GPO6";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII_MT0_CLK.$suggestSolution = "PRG0_PRU0_GPO16";
    hsr_prp1.PRU_ICSSG0_MII_G_RT.MII_MT1_CLK.$suggestSolution = "PRG0_PRU1_GPO16";
    

    Let me know if you need something else or if something is not clear.

    Best regards,

    Cyril

  • Sorry, I forgotten to ask you the following question: EIP PRU firmware is compatible between ICSSG0 and ICSSG1 ?

    It is loaded by using the following code:

    static int32_t protocol_pru_fw(PRUICSS_Handle pruicssHandle)
    {
        int32_t firmwareLoad_done = SystemP_FAILURE;
    
        /*Load the firmware*/
        PRUICSS_disableCore(pruicssHandle, ICSS_EMAC_PORT_1 - 1);
        PRUICSS_disableCore(pruicssHandle, ICSS_EMAC_PORT_2 - 1);
    
        if(PRUICSS_writeMemory(pruicssHandle, PRUICSS_IRAM_PRU(0) , 0, (uint32_t *) PRU0_FIRMWARE_NAME, sizeof(PRU0_FIRMWARE_NAME)))
        {
            if(PRUICSS_writeMemory(pruicssHandle, PRUICSS_IRAM_PRU(1) , 0, (uint32_t *) PRU1_FIRMWARE_NAME, sizeof(PRU1_FIRMWARE_NAME)))
            {
                firmwareLoad_done = SystemP_SUCCESS;
                PRUICSS_enableCore(pruicssHandle, ICSS_EMAC_PORT_1 - 1);
                PRUICSS_enableCore(pruicssHandle, ICSS_EMAC_PORT_2 - 1);
            }
        }
    
        return (firmwareLoad_done);
    }

  • Sorry, I forgotten to ask you the following question: EIP PRU firmware is compatible between ICSSG0 and ICSSG1 ?

    Yes, EIP firmware is compatible for both ICSSG0 and ICSSG1.

    I see you have enabled mdio manual mode. SO could you please check if the emulated MDIO register detect the phy alive and link register. This you can check using memory browser at address 0x3009FF00

  • Hi,
    I checked address (ICSSG1) 0x3009FF00 and it returns:
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    When I checked (ICSSG0) 0x3001FF00, it returns:

    00000000 400000FF 00000005 00000001 00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 20227849 000000C0 00000000 000000C2 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    MDIO accesses are working correctly. I can read PHY IDs and set/get other registers.

    Here is the result of the dump:

    PHY '0' @ 0x00
        0x00                 BMCR: 0x1000 AN_Enable
        0x01                 BMSR: 0x786D 100TXFD 100TXHD 10TXFD 10TXHD NoPreample AN_DONE ANAbl LinkSts ExtCapa
        0x02              PHYIDR1: 0x2000
        0x03              PHYIDR2: 0xA131
        0x04                 ANAR: 0x01E1 100FD 100HD 10FD 10HD IEEE802.3
        0x05               ALNPAR: 0xCDE1 NextPage Ack APAUSE PAUSE 100FD 100HD 10FD 10HD IEEE802.3
        0x06                 ANER: 0x000F LP_NP_ABLE DEV_NP_ABLE PAGE_RX LP_AUTONEG_ABLE
        0x07               ANNPTR: 0x2001 MSG_PAGE
        0x08              ANLNPTR: 0x0000
        0x09                  CR1: 0x0000
        0x0A                  CR2: 0x0100
        0x0B                  CR3: 0x040B DescLnkDwnMode DropRxEr DropSnr DropNrjLoss
        0x0D                REGCR: 0x0000
        0x0E                ADDAR: 0x0000
        0x0F                 FLDS: 0x0080 RxErr
        0x10               PHYSTS: 0x5E15 MDIX Polarity Carrier Signal_det Dscr_lock AutoNegCplt FD Link
        0x11               PHYSCR: 0x0108  IntPol
        0x12                MISR1: 0x7400
        0x13                MISR2: 0x2800
        0x14                FCSCR: 0x0000
        0x15                 RECR: 0x0000
        0x16                BISCR: 0x0100 NormPwr
        0x17                 RCSR: 0x0049
        0x18                LEDCR: 0x0480
        0x19                PHYCR: 0x8C00 AutoMdixEn MiiLinkSts
        0x1A              10BTSCR: 0x0010 PolarityInv
        0x1B               BICSR1: 0x007D
        0x1C               BICSR2: 0x05EE
        0x1E                 CDCR: 0x0102  CableDiagComp
        0x1F               PHYRCR: 0x0000
        0x25               MLEDCR: 0xCDE1
        0x27                COMPT: 0x2001
        0x2A              10M_CFG: 0x0100
    
    PHY '1' @ 0x02
        0x00                 BMCR: 0x1000 AN_Enable
        0x01                 BMSR: 0x7849 100TXFD 100TXHD 10TXFD 10TXHD NoPreample ANAbl ExtCapa
        0x02              PHYIDR1: 0x2000
        0x03              PHYIDR2: 0xA131
        0x04                 ANAR: 0x01E1 100FD 100HD 10FD 10HD IEEE802.3
        0x05               ALNPAR: 0x0000
        0x06                 ANER: 0x0006 DEV_NP_ABLE PAGE_RX
        0x07               ANNPTR: 0x2001 MSG_PAGE
        0x08              ANLNPTR: 0x0000
        0x09                  CR1: 0x0000
        0x0A                  CR2: 0x0100
        0x0B                  CR3: 0x040B DescLnkDwnMode DropRxEr DropSnr DropNrjLoss
        0x0D                REGCR: 0x0000
        0x0E                ADDAR: 0x0000
        0x0F                 FLDS: 0x0080 RxErr
        0x10               PHYSTS: 0x0812 Carrier AutoNegCplt 10M
        0x11               PHYSCR: 0x0108  IntPol
        0x12                MISR1: 0x6400
        0x13                MISR2: 0x2800
        0x14                FCSCR: 0x0000
        0x15                 RECR: 0x0000
        0x16                BISCR: 0x0100 NormPwr
        0x17                 RCSR: 0x0049
        0x18                LEDCR: 0x0480
        0x19                PHYCR: 0x8002 AutoMdixEn
        0x1A              10BTSCR: 0x0000
        0x1B               BICSR1: 0x007D
        0x1C               BICSR2: 0x05EE
        0x1E                 CDCR: 0x0102  CableDiagComp
        0x1F               PHYRCR: 0x0000
        0x25               MLEDCR: 0x0000
        0x27                COMPT: 0x2001
        0x2A              10M_CFG: 0x0100
    

    Is it possible that I misconfigured DMA accesses (RX interrupts are generated)?

    Best regards,

    Cyril

  • I discovered that unicast and broadcast are not received.

    But, multicast packets are partially received (the first 4 bytes of the destination address are missing).

    The remaining bytes are valid:

    TX: 01 00 5E 7F FF FA C8 5A CF 0C 23 57 08 06 00 01 08 00 06 04 00 01 C8 5A CF 0C 23 57 C0 A8 01 CC 00 00 00 00 00 00 C0 A8 01 0A
    RX:                     FF FA C8 5A CF 0C 23 57 08 06 00 01 08 00 06 04 00 01 C8 5A CF 0C 23 57 C0 A8 01 CC 00 00 00 00 00 00 C0 A8 01 0A

  • Good to know PHY is working properly.

    Is it possible that I misconfigured DMA accesses (RX interrupts are generated)?

    Best regards,

    No, HSR-PRP driver does not use DMA.

    AM243x MCU+ SDK: ICSS-EMAC Debug Guide (ti.com)

    Could you please check this guide and let me know your observations.

  • Here is the observation I see:

    mod switch:0.show icss stats
     Port 0 statistics:
     Port 1 statistics:
              host.txBcast 1
             host.txOctets 64
              host.rxMcast 6
             host.rxOctets 976
      host.rxUnknownProtocol 6
            host.linkBreak 2
               pru.txBcast 1
              pru.txOctets 64
               pru.rxMcast 6
               pru.rxUcast 2
              pru.rxOctets 976
              pru.tx64byte 1
              pru.rx64byte 4
         pru.rx128_255byte 4
      pru.stormPrevCounterMC 92
      pru.rxUnderSizedFrames 2
     Port 2 statistics:
      host.txDroppedPackets 1
    icss:
      - emac mac 00:A0:91:CA:AF:00
      - pru0:
        - version           0x00000000
        - version2          0x00000000
        - feature           0x00000000
        - futureFeature     0x00000000
        - phySpeed          100
        - portStatus        1
        - portControl       enabled (0x01)
        - portMac           00:A0:91:CA:AF:00
        - rxInterruptStatus 0x07D00100
        - emacTtsConfigBase 0x00000000
        - colStatus         0x00
        - promiscuousMode   0x00000000
        - interfaceMacAddr  00:00:00:00:00:00
      - pru1:
        - version           0x00000000
        - version2          0x00000000
        - feature           0x00000000
        - futureFeature     0x00000000
        - phySpeed          0
        - portStatus        0
        - portControl       disabled (0x00)
        - portMac           00:A0:91:CA:AF:00
        - rxInterruptStatus 0x00000100
        - emacTtsConfigBase 0x00070000
        - colStatus         0x00
        - promiscuousMode   0x00000000
        - interfaceMacAddr  00:A0:91:CA:AF:00

    I only have one port plugged (pru0).

    I disabled storm protection at initialization phase.

    The strange thing is that version and version2 of PRUs are empty. Is it normal?

    Cyril

  • Hi,
    After a cold restart, I see the following:

    mod switch:0.show stats icss
     Port 0 statistics:
     Port 1 statistics:
              host.txBcast 6
             host.txOctets 384
              host.rxUcast 1
             host.rxOctets 26
      host.rxUnknownProtocol 1
            host.linkBreak 2
               pru.txBcast 6
              pru.txOctets 384
               pru.rxMcast 6
               pru.rxUcast 3
              pru.rxOctets 920
              pru.tx64byte 6
              pru.rx64byte 5
         pru.rx128_255byte 4
      pru.stormPrevCounterMC 118
      pru.rxUnderSizedFrames 3
     Port 2 statistics:
      host.txDroppedPackets 6
    icss:
      - emac mac 00:A0:91:CA:AF:00
      - pru0:
        - version           0x00000405
        - version2          0x85030000
        - feature           0x0400412A
        - futureFeature     0x00000000
        - phySpeed          100
        - portStatus        1
        - portControl       enabled (0x01)
        - portMac           00:A0:91:CA:AF:00
        - rxInterruptStatus 0x07D00100
        - emacTtsConfigBase 0x00000000
        - colStatus         0x00
        - promiscuousMode   0x00000000
        - interfaceMacAddr  00:00:00:00:00:00
      - pru1:
        - version           0x00000405
        - version2          0x85030000
        - feature           0x0400412A
        - futureFeature     0x00000000
        - phySpeed          0
        - portStatus        0
        - portControl       disabled (0x00)
        - portMac           00:A0:91:CA:AF:00
        - rxInterruptStatus 0x00000100
        - emacTtsConfigBase 0x00980000
        - colStatus         0x00
        - promiscuousMode   0x00000000
        - interfaceMacAddr  00:A0:91:CA:AF:00

    Versions and features are correctly set. But packets are not received or transmitted.

    Best regards,
    Cyril

  • I changed the function used to load EIP firmware to be able to get PRU firmware version as follow:

    static int32_t protocol_pru_fw(PRUICSS_Handle pruicssHandle)
    {
        int32_t firmwareLoad_done = SystemP_FAILURE;
        int32_t status;
    
        status = PRUICSS_resetCore(pruicssHandle, PRUICSS_PRU0);
        DebugP_assert(SystemP_SUCCESS == status);
        status = PRUICSS_resetCore(pruicssHandle, PRUICSS_PRU1);
        DebugP_assert(SystemP_SUCCESS == status);
    
        /*Load the firmware*/
        status = PRUICSS_disableCore(pruicssHandle, PRUICSS_PRU0);
        DebugP_assert(SystemP_SUCCESS == status);
        status = PRUICSS_disableCore(pruicssHandle, PRUICSS_PRU1);
        DebugP_assert(SystemP_SUCCESS == status);
    
        if(PRUICSS_writeMemory(pruicssHandle, PRUICSS_IRAM_PRU(0) , 0, (uint32_t *) PRU0_FIRMWARE_NAME, sizeof(PRU0_FIRMWARE_NAME)))
        {
            if(PRUICSS_writeMemory(pruicssHandle, PRUICSS_IRAM_PRU(1) , 0, (uint32_t *) PRU1_FIRMWARE_NAME, sizeof(PRU1_FIRMWARE_NAME)))
            {
                firmwareLoad_done = SystemP_SUCCESS;
                status = PRUICSS_enableCore(pruicssHandle, PRUICSS_PRU0);
                DebugP_assert(SystemP_SUCCESS == status);
                status = PRUICSS_enableCore(pruicssHandle, PRUICSS_PRU1);
                DebugP_assert(SystemP_SUCCESS == status);
            }
        }
    
        return (firmwareLoad_done);
    }
    

    Now, I always have a filled version/version2.

    icss:
      - emac mac 00:A0:91:CA:AF:00
      - P0; pru0 (@0x30000000):
        - version           @0x30000000 0x00000405
        - version2          @0x30000004 0x85030000
        - feature           @0x30000008 0x0400412A
        - futureFeature     @0x3000000C 0x00000000
        - statistics        @0x30001F00 size 152
        - phySpeed          @0x30001F9C 100
        - portStatus        @0x30001FA0 1
        - portControl       @0x30001FA6 enabled (0x01)
        - portMac           @0x30001FAA 00:A0:91:CA:AF:00
        - rxInterruptStatus @0x30001FB0 0x00000000
        - p0QueueDesc       @0x30001E7C
        - p0ColQueueDesc    @0x30001E64
        - stormPreventionBC @0x30001F98 0
        - stormPreventionMC @0x30001FB1 0
        - stormPreventionUC @0x30001FB5 0
        - emacTtsConfigBase @0x30001E98 0x00000000
        - colStatus         @0x30001E60 0x00
        - promiscuousMode   @0x30001C44 0x00000000
        - interfaceMacAddr  @0x30001E58 00:00:00:00:00:00
      - P1; pru1 (@0x30002000):
        - version           @0x30002000 0x00000405
        - version2          @0x30002004 0x85030000
        - feature           @0x30002008 0x0400412A
        - futureFeature     @0x3000200C 0x00000000
        - statistics        @0x30003F00 size 152
        - phySpeed          @0x30003F9C 0
        - portStatus        @0x30003FA0 0
        - portControl       @0x30003FA6 disabled (0x00)
        - portMac           @0x30003FAA 00:A0:91:CA:AF:00
        - rxInterruptStatus @0x30003FB0 0x00000000
        - p0QueueDesc       @0x30003E7C
        - p0ColQueueDesc    @0x30003E64
        - stormPreventionBC @0x30003F98 0
        - stormPreventionMC @0x30003FB1 0
        - stormPreventionUC @0x30003FB5 0
        - emacTtsConfigBase @0x30003E98 0x00070000
        - colStatus         @0x30003E60 0x00
        - promiscuousMode   @0x30003C44 0x00000000
        - interfaceMacAddr  @0x30003E58 00:A0:91:CA:AF:00

    Unfortunately, packets are still not sent/received correctly...

    Cyril

  • Hi Cyril,

    Couple of question on this

    1) Do you see the Rx interrupt is getting hit? - From the previous replies it looks like this is happening, could you confirm this anyways?

    2) Could you share ICSS Memory dump between ICSSG0 and ICSSG1 once the application is loaded (Without connecting the Link on any ports)

    3) pru.txBcast 6
        pru.txOctets 384

        Looks like firmware sends out some packet on wire. Did you capture from the interface to verify the packet is on the wire or not?

    Regards,
    Prajith

  • Hi Jayarajan,

    1) Yes, Rx interrupt is generated. The received frames are coming from the receive callback.

    3) Yes, firmware is trying to send packets (arp broadcast/unicast packets) when link comes.

    2)DRAM0.datDRAM1.dat

    Here is the dump asked.

    Hope it helps. Let me know if you need something else.

    Best regards,

    Cyril

  • HI ,

    Do you have an update about the file shared by Cyril last week ? 

    Thanks

    Christophe.

  • Hi,
    Did you have time to investigate this issue?

    Best regards,
    Cyril

  • Updating Thread: 

     

    The Demo used to test was HSR/PRP demo from the SDK. When running this example on their board, nothing is sent or received. The logs for both can be seen below. 

    PRP:

    This is the result of prp project (same behavior)
    Mode: MII
    Starting lwIP, local interface IP is 192.168.1.10
    [LWIPIF_LWIP]Link is Up on port 1
    [LWIPIF_LWIP] Interface layer handle is Initialised
    [LWIPIF_LWIP] NETIF INIT SUCCESS
    status_callback==UP, local interface IP is 192.168.1.10
    UDP server listening on port 5001
    
    PRP Sample application running
    Assigned IP     : 192.168.1.10
    Mac Id          : 11:11:12:12:12:12link_callback==UP
    
    
    
    IP Address      : 192.168.1.10
    Device config   : PRP
    
    HSR/PRP Application Menu Options. Press key (Upper/Lower)
    *******************************************
    S : Show Statistics
    L : Show LRE Statistics
    C : Show HSR/PRP Configuration
    N : Show Ring members/Node Table
    M : Multicast filter handling
    V : VLAN filter handling
    E : Print CPU Load
    I : Assign IP address
    P : Show PTP/1588 status
    R : Run Rx/Tx test
    X : To perform DUT side settings
    H : Help menu. Shows details on all the options
    ********************************************
    r
    
    Run Rx/Tx test....started
    To configure device as Transmitter enter T or t. To configure as receiver enter R or r :        t
    
    Device configured as transmitter, sending packets now
    To send normal HSRPRP packet : Enter N; To send GOOSE packet : Enter G; To send VLAN+GOOSE packet : Enter V     g
    
    Device transmitted GooseTestFrame packet for tx_count = 0
    Device transmitted GooseTestFrame packet for tx_count = 1
    Device transmitted GooseTestFrame packet for tx_count = 2
    Device transmitted GooseTestFrame packet for tx_count = 3
    Device transmitted GooseTestFrame packet for tx_count = 4
    Device transmitted GooseTestFrame packet for tx_count = 5
    Device transmitted GooseTestFrame packet for tx_count = 6
    Device transmitted GooseTestFrame packet for tx_count = 7
    Device transmitted GooseTestFrame packet for tx_count = 8
    Device transmitted GooseTestFrame packet for tx_count = 9
    Device transmitted GooseTestFrame packet for tx_count = 10
    Device transmitted GooseTestFrame packet for tx_count = 11
    Device transmitted GooseTestFrame packet for tx_count = 12
    Device transmitted GooseTestFrame packet for tx_count = 13
    Device transmitted GooseTestFrame packet for tx_count = 14
    Device transmitted GooseTestFrame packet for tx_count = 15
    Device transmitted GooseTestFrame packet for tx_count = 16
    Device transmitted GooseTestFrame packet for tx_count = 17
    Device transmitted GooseTestFrame packet for tx_count = 18
    Device transmitted GooseTestFrame packet for tx_count = 19
    Failed to transmit GooseTestFrame for tx_count = 20
    Failed to transmit GooseTestFrame for tx_count = 21
    …..
    Failed to transmit GooseTestFrame for tx_count = 238
    Failed to transmit GooseTestFrame for tx_count = 239
    Device transmitted GooseTestFrame packets...completed
    Device configured as transmitter...completed
    Run Rx/Tx test....completed
    
    
    IP Address      : 192.168.1.10
    Device config   : PRP
    

    HSR:

    This is the output for POC board:
    IP Address      : 192.168.1.10
    Device config   : HSR MODE H
    
    HSR/PRP Application Menu Options. Press key (Upper/Lower)
    *******************************************
    S : Show Statistics
    L : Show LRE Statistics
    C : Show HSR/PRP Configuration
    N : Show Ring members/Node Table
    M : Multicast filter handling
    V : VLAN filter handling
    E : Print CPU Load
    I : Assign IP address
    P : Show PTP/1588 status
    R : Run Rx/Tx test
    X : To perform DUT side settings
    H : Help menu. Shows details on all the options
    ********************************************
    link_callback==DOWN
    link_callback==UP
    R
    
    Run Rx/Tx test....started
    To configure device as Transmitter enter T or t. To configure as receiver enter R or r :        t
    
    Device configured as transmitter, sending packets now
    To send normal HSRPRP packet : Enter N; To send GOOSE packet : Enter G; To send VLAN+GOOSE packet : Enter V     G
    
    Device transmitted GooseTestFrame packet for tx_count = 0
    Device transmitted GooseTestFrame packet for tx_count = 1
    Device transmitted GooseTestFrame packet for tx_count = 2
    Device transmitted GooseTestFrame packet for tx_count = 3
    Device transmitted GooseTestFrame packet for tx_count = 4
    Device transmitted GooseTestFrame packet for tx_count = 5
    Device transmitted GooseTestFrame packet for tx_count = 6
    Device transmitted GooseTestFrame packet for tx_count = 7
    Device transmitted GooseTestFrame packet for tx_count = 8
    Device transmitted GooseTestFrame packet for tx_count = 9
    Device transmitted GooseTestFrame packet for tx_count = 10
    Device transmitted GooseTestFrame packet for tx_count = 11
    Device transmitted GooseTestFrame packet for tx_count = 12
    Device transmitted GooseTestFrame packet for tx_count = 13
    Failed to transmit GooseTestFrame for tx_count = 14
    Failed to transmit GooseTestFrame for tx_count = 15
    Failed to transmit GooseTestFrame for tx_count = 16
    Failed to transmit GooseTestFrame for tx_count = 17
    Failed to transmit GooseTestFrame for tx_count = 18
    Failed to transmit GooseTestFrame for tx_count = 19
    Failed to transmit GooseTestFrame for tx_count = 20
    Failed to transmit GooseTestFrame for tx_count = 21
    Failed to transmit GooseTestFrame for tx_count = 22
    Failed to transmit GooseTestFrame for tx_count = 23
    Failed to transmit GooseTestFrame for tx_count = 24
    Failed to transmit GooseTestFrame for tx_count = 25
    Failed to transmit GooseTestFrame for tx_count = 26
    Failed to transmit GooseTestFrame for tx_count = 27
    Failed to transmit GooseTestFrame for tx_count = 28
    Failed to transmit GooseTestFrame for tx_count = 29
    
    

    The changes that were implemented to support the custom board were: 

    • ICSS instance (from 1 to 0)
    • PHY addresses changed to [0; 2]
    • EDC_LATCH_IN0 disabled
    • EDC_SYNC_OUT0 disabled
    • Changed CONFIG_ETHPHY0 to CUSTOM (Custom Device Name set to DP83826E)
    • Changed CONFIG_ETHPHY1 to CUSTOM (Custom Device Name set to DP83826E)
    • Enable “CONFIG_ICSS_EMAC0 Learning Enable”

    Disable unnecessary components from “.syscfg” file:

    • I2C
    • GPIO
    • EEPROM

    File modification:

    • hsr_prp_soc.c:
      • hsrprp_rgmii_init()
        • Surround this function with #ifdef HSR_PRP_RGMII/ #endif
    • \source\board\makefile.am243x.r5f.ti-arm-clang:
      • Add “ethphy_dp83826e.c”
      • Compile sdk by using the following command:
        • gmake libs PROFILE=debug

    #hsr_prp_soc.c 
    #ifdef HSR_PRP_RGMII
    void hsrprp_rgmii_init()
    {
        ETHPHY_DP83869_LedSourceConfig ledConfig;
    
        …
    
    
        hsrprp_configure_rat();
    }
    #endif /* HSR_PRP_RGMII */ 
    

    Changes to makefile.am243x.r5f.ti-arm-clang:

    FILES_common := \

        eeprom.c \

        eeprom_at24c.c \

        ethphy.c \

        ethphy_dp83869.c \

        ethphy_dp83826e.c \

        flash.c \

        flash_nor_ospi.c \

        led.c \

        led_gpio.c \

        led_tpic2810.c \

        led_ioexp.c \

        ioexp_tca6424.c \

        nor_spi_sfdp.c \

  • dump_30000000_80000.dat

    Hi,
    Here is the requested dump asked by Daviel.

    Hope it helps,

    Cyril

  • Hi,

    I modified today's sample code by adding multicast filtering configuration.

    icssEmacParams.pruicssIntcInitData = &pruss_intc_initdata;
    icssEmacParams.fwStaticMMap = &(icss_emacFwStaticCfgLocal[1]);
    icssEmacParams.fwDynamicMMap = &icss_emacFwDynamicCfgLocal;
    icssEmacParams.fwVlanFilterParams = &icss_emacFwVlanFilterCfg;
    icssEmacParams.fwMulticastFilterParams = &icss_emacFwMulticastFilterCfg;
    icssEmacParams.pruicssHandle = prusshandle;

    With this new line, I can see rx interrupt (I mean, the same behavior we have with the POC)
    Cyril

  • Hi Nilabh,

    Thanks, for your help on the resolution of this issue.
    You can close the ticket.

    Thanks
    Christophe.

  • Glad to hear that Christophe