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.

AM3359: PRP RX error

Part Number: AM3359

Hi Community,

I am trying to run default prp app with to rtos, whenever i tried to execute tx/rx, rx is hang below erro msg

"CortxA8: Unhandled ADP_Stopped exception 0x20023"

and No source available for "do_AngelSWI(int, void *) [/media/Data/TI-Data/HSR-PRP/protocols/hsr_prp/projects/prp_app_AM335x_arm/AM335x_release/prp_app_AM335x_arm.out] at 0x8006849c"

and Can't find a source file at "/home/xlibrary/trees/gnu/gnu-e02/src/linaro/gcc-arm-none-eabi-6-2017-q1-update/src/newlib/libgloss/arm/swi.h"  Locate the file or edit the source lookup path to include its location.

and No source available for "xdc_runtime_System_Module_GateProxy_create(struct xdc_runtime_System_Module_GateProxy_Params *, struct xdc_runtime_Error_Block *) [/media/Data/TI-Data/HSR-PRP/protocols/hsr_prp/projects/prp_app_AM335x_arm/AM335x_release/prp_app_AM335x_arm.out] at 0x0"

Please let me know what is the issue.

Regards,

Pankaj

  • Hi Pankaj,

    Did you apply the patch in protocols\pdk_patches\04.03.00 to PDK?

    Regards,

    Garrett

  • Hi Garrett,

    Yes I have applied the patch "PRSDK-3086-HSRPRP_2_interrupts_PDK.patch" to RTOS sdk-4.3.0.5/pdk_am335x_1_0_10, I am using "PRU-ICSS-HSR-PRP-DAN-01.00.04.02-Linux-x86-Install.bin" and "ti-processor-sdk-rtos-am335x-evm-04.03.00.05-Linux-x86-Install.bin"

    I have also tried with replacing icss_emac and nimu_icss to pdk from pad_patches.

    I am able to see node table

    N O D E   T A B L E   N E W

    Idx         MacAddress     Type  DD        Rx   LineErr     RxSup  TlsSup     Tls
    ---  -----------------  -------  --  --------  --------  --------  ------  ------
    001  xx-xx-xx-xx-xx-xx  DANP     02  00000085  00000000  00000032  000141  003711
                                                               00000086  00000000  00000032                003711


    How to execute TX/RX test, first TX and then RX or RX should running first and wait for TX.

    What is interrupt pacing option do i need to set this "F : Host Rx Interrupt Config | 0 : Disable | 1. Enable | 2. Enable with Adaptive Logic"

    Please let me know whats wrong with the test.

    Regards,

    Pankaj

  • Hi Garrett,

    I have attached ccs screenshot of error msg when i tried to rx in prp app.

    Regards,

    Pankaj

  • Please find attached screenshot of function call stack , when exception happen. (I am using ccs 9.1)

  • I am out of office today, but don't recall any crash issue with the application. Can you try the pre-built binaries to see if it works?

    http://software-dl.ti.com/processor-industrial-sw/esd/PRU-ICSS-HSR-PRP-DAN/latest/index_FDS.html

    Thanks,

    Garrett

  • Hi Garrett,

    I tried with prebuilt binaries but same issue, below are the console logs.

    Version - HSR/PRP DAN 01.00.04.02
    Board name      : A335_ICE
    Chip Revision   :
    SYS/BIOS PRP Sample application running 2.1A
    Build Timestamp      : Jun 29 2018 10:39:48
    Assigned IP     : xx.xx.xx.xx
    Mac Id          : xx:xx:xx:xx:xx:xx


    ICSS_EMAC_DRV_VERSION_ID        : 0x100000b

    IP Address      : xx.xx.xx.xx
    Mac Id          : xx:xx:xx:xx:xx:xx
    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
    F : Host Rx Interrupt Config | 0 : Disable | 1. Enable | 2. Enable with Adaptive Logic
    I : Assign IP address
    P : Show PTP/1588 status
    R : Run Rx/Tx test
    H : Help menu. Shows details on all the options
    ********************************************

    To configure device as Transmitter enter T or t. To configure as receiver enter R or r :
    Device configured as receiver, will wait for 3 minutes to receive packets // hangs here when I tried tx from another board.

    Test Setup : two switches (not connected to network) and two boards, each board one port connected to one switch and another one port connected to another switch.

    I am waiting for your response.

    Regards,

    Pankaj

  • Garrett,

    I tried after changing heap size and stack size, still not working.

    Regards,

    Pankaj

  • Pankaj,

    Can you draw a diagram to show how the ports of ICEs connects to switches?

    Regards,

    Garrett

  • Garrett,

    Below is the diagram.

    Note :- Switches are not connected to any network.One board is used for TX and another one is used for RX.

    Regards,

    Pankaj

  • Garrett,

    I am waiting for your response.

    Regards,

    Pankaj

  • Pankaj,

    Did you update the IP address for the devices? e.g. assign IDK #1 IP address”: 192.168.1.10, IDK #2 IP address:192.168.1.11.

    Press key “R” to run Tx/Rx test, then configure an IDKs as receiver by entering “r” and another IDK as transmit by entering “t”...

    Regards,

    Garrett

  • HI Garrett,

    Yes I have updated IP address of both the port, I am doing rx and tx. but when I tx , rx got the error, as mention in screenshot.

    This TI-Examples of HSR/PRP were tested with same setup ?

    Regards,

    Pankaj

  • Garrett,

    Same issue with HSR app and Setup

    I am waiting for your response.

    Regards,

    Pankaj

  • Pankaj,

    Can you check if the fix in the thread helps? https://e2e.ti.com/support/processors/f/791/t/616514#pi320966=6

    I will be trying to replicate the issue on my side...

    Thanks,

    Garrett

  • Hi Garrett,

    I already tried prebuilt binaries with sd card .

    No progress on this , still facing same issue.

    Regards,

    Pankaj

  • Hi Pankaj,

    Can you please try to replace the icev2AM335x_pinmux.c in pdk_am335x_1_0_12\packages\ti\board\src\icev2AM335x with the attached one and then rebuild board library or add the file into your PRP project to see if it resolve the "CortxA8: Unhandled ADP_Stopped exception 0x20023" issue.

    /**
     *   @file  icev2am335x_pinmux.c
     *
     *   @brief
     *      This is the pin configuration for ICE V2 AM335x.
     *
     *  \par
     *  ============================================================================
     *  @n   (C) Copyright 2009-2015, Texas Instruments, Inc.
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     *  \par
    */
    
    #include <stdint.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include "board_internal.h"
    #include "types.h"
    #include "hw_types.h"
    #include "chipdb.h"
    #include "pinmux.h"
    #include "error.h"
    #include "am335x_pinmux.h"
    #include "debug.h"
    
    extern uint32_t icssPinMuxFlag;
    
    Board_STATUS Board_pinmuxConfig (void)
    {
        int32_t status;
    
        /* I2C */
        status = PINMUXModuleConfig(CHIPDB_MOD_ID_I2C, 0U, NULL);
        if (S_PASS != status)
        {
            return BOARD_PINMUX_INVALID_MODE;
        }
    
        /* UART */
        status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 1U, NULL);
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 3U, NULL);
        }
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 4U, NULL);
        }
    
        /* GPIO */
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_GPIO, 0U, NULL);
        }
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_GPIO, 1U, NULL);
        }
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_GPIO, 2U, NULL);
        }
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_GPIO, 3U, NULL);
        }
    
        /* MCSPI */
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_MCSPI, 0U, NULL);
        }    
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_MCSPI, 1U, NULL);
        }
    
        /*PRU_ICSS*/
        if((S_PASS == status) && (icssPinMuxFlag == 1U))
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_PRU_ICSS, 1U, NULL);
        }
    
        /* CPSW */
        if((S_PASS == status) && (icssPinMuxFlag == 0U))
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_CPSW, 0U, NULL);
        }
    
        /* MMCSD */
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_MMCSD, 0U, NULL);
        }
    
        /*GPMC*/
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_GPMC, 0U, NULL);
        }
    
        /* DCAN */
        if(S_PASS == status)
        {
            status = PINMUXModuleConfig(CHIPDB_MOD_ID_DCAN, 0U, NULL);
        }
    
        return BOARD_SOK;
    }
    
    
    int32_t PINMUXModuleConfig(chipdbModuleID_t moduleId, uint32_t instNum, 
                                                                  void* pParam1)
    {
        pinmuxModuleCfg_t* pModuleData = NULL;
        pinmuxPerCfg_t* pInstanceData = NULL;
        volatile pinmuxBoardCfg_t* pPinmuxData = NULL;
        uint32_t ctrlModBase = CHIPDBBaseAddress(CHIPDB_MOD_ID_CONTROL_MODULE, 0);
        int32_t status = E_FAIL;
        uint32_t index = 0;
        
        /* Get module Data */
        pPinmuxData = gIceV2PinmuxData; 
        ASSERT(NULL != pPinmuxData);
            
        status = E_INVALID_MODULE_ID;
        for(index = 0; ((S_PASS != status) && 
           (CHIPDB_MOD_ID_INVALID != pPinmuxData[index].moduleId)); index++)
        {
            if(pPinmuxData[index].moduleId == moduleId)
            {
                pModuleData = pPinmuxData[index].modulePinCfg;
                ASSERT(NULL != pModuleData);
                status = S_PASS;
            }
        }
    
        /* Get instance Data */
        if(S_PASS == status)
        {
            status = E_INST_NOT_SUPP;
            for(index = 0; ((S_PASS != status) && 
              (CHIPDB_INVALID_INSTANCE_NUM != pModuleData[index].modInstNum)); index++)
            {
                if(pModuleData[index].modInstNum == instNum)
                {
                    pInstanceData = pModuleData[index].instPins;
                    ASSERT(NULL != pInstanceData)
                    status = S_PASS;
                }
            }
        }
            
        /* Configure Pinmux */
        if(S_PASS == status)
        {
    		for(index = 0; ((uint16_t)PINMUX_INVALID_PIN != 
    									  pInstanceData[index].pinOffset); index++)
    		{
    			if(NULL != pParam1)
    			{
    				if(pInstanceData[index].optParam == *(uint16_t*)pParam1)
    				{
    					HW_WR_REG32((ctrlModBase + pInstanceData[index].pinOffset),
    								pInstanceData[index].pinSettings);
                        status = S_PASS;
    					break;
    				}
    			}
    			else
    			{
    				HW_WR_REG32((ctrlModBase + pInstanceData[index].pinOffset),
    								pInstanceData[index].pinSettings);
    			}
    		}
    		if((NULL != pParam1) && ((uint16_t)PINMUX_INVALID_PIN == pInstanceData[index].pinOffset))
    		{
    			status = E_FAIL;
    		}
        }
        
        return status;
    }
    
    

    Thanks,
    Garrett

  • Hi Garrett,

    Thanks for the file, I tried pdk_am335x_1_0_10\packages\ti\board\src\icev2AM335x\ and rebulit pdk as well as hsr/prp projects , still facing same issue, No improvement on issue. (One time I observed No "CortxA8: Unhandled ADP_Stopped exception 0x20023" but TX/RX test not worked). We are using 4.3 SDK "ti-processor-sdk-rtos-am335x-evm-04.03.00.05-Linux-x86-Install.bin" .

    Are you able to replicate issue at your end ?

    Regards,

    Pankaj

  • Hi Pankaj,

    I could reproduce the PRP Rx issue with pre-built binary.

    We are trying to fix the issue with the upcoming HSR/PRP release based on the latest Processor SDK, and provide you an early access when the fix is available.

    Regards,

    Garrett

  • Pankaj,

    In the meantime, can you try to update the examples/hsr_prp/AM335x/hsr_prp_soc.c as followings to see if it fixes the Rx error?

    void HSR_PRP_socInit()
    {
          ....

          flashHandle = Board_flashOpen(NULL, NULL, NULL);
          Board_i2cLedInit();
    }

    Regards,

    Garrett

  • Hi Garret,

    I am Hiren Bhuva, I work with Pankaj.

    I tried to test the Rx and Tx by adding Board_i2cLedInit(); function call. But, still the hsr app is getting the error when we start Tx from different device as it was happening previously.

  • Hi Garrett,

    Any update on this issue ?

    Let me know any pointers/suspect for this issue, so that I will try to debug it.

    Regards,

    Pankaj