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.

AM5749:idk574x: The debugged serial port caused the program to terminate abnormally.

Part Number: AM5749


Hello, TI experts;
I use IDK574x. When I use the SD card to run the PDK program, if the debug serial port is not plugged in, the program will run normally. When I plug in the debug serial port, the program will terminate and the development board will shut down. But the VID and PID of XDS100v2 are correct, I can connect to A15 core on CCS. I don't know if XDS100v2 is incompatible with Windows 10. When I run the program on the SD card, plugging in the debug serial port will cause the program to terminate.
I don't know if you have encountered this kind of problem. If you can help me, I would appreciate it!

  • Hi,

    We have not seen this kind of behavior.

    Did you start debug session in CCS when you see the program terminated?

    Please provide the exact steps to reproduce the issue.

    Regards,
    Stanley

  • Hi,

    First of all thank you for your reply.

    Yes, I tried debugging in CCS after the program was terminated.

    Firstly, the program I debug is NIMU_BasicExample_idkAM574x_armExampleproject without any modification. The main function is in the attachment.

    I put the app and MLO in the SD card. When running the program on the SD card, the information printed by the serial port is as follows. The information printed each time may be different.

    1:
    **** PDK SBL ****
    SBL Revision: 01.00.09.02 (Jul 8 2019 - 04:07:05)
    DDR ECC is Enabled...Initializing ECC data may take few seconds
    ECC Data Initialization Completed
    Begin parsing user application
    Jumping to user application...
    --------------------------------------------------------------------------------------
    SetPhyMode:000021e1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0

    2:
    **** PDK SBL ****
    SBL Revision: 01.00.09.02 (Jul 8 2019 - 04:07:05)
    DDR ECC is Enabled...Initializing ECC data may take few seconds
    ECC Data Initialization Completed
    Begin parsing user application
    Jumping to user application...
    --------------------------------------------------------------------------------------
    SetPhyMode:000021e1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0

    SYS/BIOS Ethernet/IP (CPSW) Sample application, EVM IP address I/F 1: 192.168.1.4
    RX | Good: 0 | Bcast: 0 | Mcast: 0 | Oct: 0 |
    SetPhyMode:000021e1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0

    3:
    **** PDK SBL ****
    SBL Revision: 01.00.09.02 (Jul 8 2019 - 04:07:05)
    DDR ECC is Enabled...Initializing ECC data may take few seconds
    ECC Data Initialization Completed
    Begin parsing user application
    Jumping to user application...
    --------------------------------------------------------------------------------------
    SetPhyMode:000021e1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0

    SYS/BIOS Ethernet/IP (CPSW) Sample

    In this case, I still put the program on the SD card to run. Unlike the above conditions, I did not plug the serial port into the Windows 10 PC. I connected the IDK board to the PC via a network cable. I can ping IDK board in cmd. At this time, I think the program is running normally.

    Secondly,at this time, I was debugging the program in CCS. When I debug the TaskFxn task, the output of the serial port is as follows:

    SetPhyMode:000021e1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0

    SYS/BIOS Ethernet/IP (CPSW)

    Then the CCS console printed the following information.After that the program terminates abnormally and the board shuts down.
    IcePick_D: Error: (Error -154 @ 0xFFFFFF66) One of the FTDI driver functions used to write data returned bad status or an error. (Emulation package 9.2.0.00002)
    CS_DAP_DebugSS: Error: (Error -154 @ 0x0) One of the FTDI driver functions used to write data returned bad status or an error. (Emulation package 9.2.0.00002)
    CS_DAP_PC: Error: (Error -154 @ 0x1) One of the FTDI driver functions used to write data returned bad status or an error. (Emulation package 9.2.0.00002)
    CortexA15_0: JTAG Communication Error: (Error -154 @ 0x0) One of the FTDI driver functions used to write data returned bad status or an error. (Emulation package 9.2.0.00002)

  • /*
     * Copyright (C) 2017 - 2018 Texas Instruments Incorporated - http://www.ti.com/
     *
     *
     *  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.
     *
    */
    
    /* ========================================================================== */
    /*                             Include Files                                  */
    /* ========================================================================== */
    
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <xdc/std.h>
    #include <xdc/runtime/Error.h>
    #include <xdc/runtime/System.h>
    #include <ti/sysbios/BIOS.h>
    #include <ti/sysbios/knl/Task.h>
    
    
    
    #include <ti/csl/soc.h>
    #include <ti/csl/cslr_device.h>
    #if defined (SOC_AM574x)
    #include <ti/csl/soc/am574x/src/csl_device_xbar.h>
    #else
    #include <ti/csl/soc/am572x/src/csl_device_xbar.h>
    #endif
    
    #include <ti/ndk/inc/netmain.h>
    #include <ti/ndk/inc/stkmain.h>
    #include "ti/ndk/inc/os/osif.h"
    
    #include <ti/board/board.h>
    
    #include <ti/drv/uart/UART.h>
    #include <ti/drv/uart/UART_stdio.h>
    
    #include <ti/drv/emac/emac_drv.h>
    #include <ti/drv/emac/src/v4/emac_drv_v4.h>
    
    #ifdef NIMU_FTP_APP
    #include <ti/transport/ndk/nimu/example/ftpApp/ftpserver/ftpserver.h>
    #endif
    
    extern char *LocalIPAddr;
    extern void app_stats(UArg arg0, UArg arg1);
    #ifdef NIMU_DUAL_MAC_MODE
        /* Static IP Address settings for interface 1 */
        char *ipAddr      = "192.168.2.4";
        char *ipMask      = "255.255.255.0";
        char *ipGateway   = "192.168.2.1";
    #endif
    
    /* ========================================================================== */
    /*                             Macros                                  */
    /* ========================================================================== */
    /* Enable the below macro to have prints on the IO Console */
    
    //#define IO_CONSOLE
    
    #ifndef IO_CONSOLE
    #define NIMU_log                UART_printf
    #else
    #define NIMU_log                printf
    #endif
    
    #define MAX_TABLE_ENTRIES   3
    
    /* ========================================================================== */
    /*                            Global Variables                                */
    /* ========================================================================== */
    
    /**Task handle for EIP*/
    Task_Handle main_task;
    
    static int nimu_device_index = 0U;
    
    
    NIMU_DEVICE_TABLE_ENTRY NIMUDeviceTable[MAX_TABLE_ENTRIES];
    
    void TaskFxn(UArg a0, UArg a1);
    extern int CpswEmacInit (STKEVENT_Handle hEvent);
    
    
    /**
     *  \name main
     *  \brief Main Function
     *  \param none
     *  \return none
     *
     */
    int main()
    {
        /* Call board init functions */
        Board_initCfg boardCfg;
        Task_Params taskParams;
    
        boardCfg =  BOARD_INIT_PINMUX_CONFIG |
            BOARD_INIT_MODULE_CLOCK | BOARD_INIT_UART_STDIO;
    
    #if defined (SOC_AM574x) && defined(NIMU_DUAL_MAC_MODE)
        boardCfg |= BOARD_INIT_ETH_PHY;
    #endif
        Board_init(boardCfg);
    
    #ifdef _TMS320C6X
        CSL_xbarDspIrqConfigure(1,CSL_XBAR_INST_DSP1_IRQ_75, CSL_XBAR_GMAC_SW_IRQ_RX_PULSE);
        CSL_xbarDspIrqConfigure(1,CSL_XBAR_INST_DSP1_IRQ_76, CSL_XBAR_GMAC_SW_IRQ_TX_PULSE);
    #elif defined (__TI_ARM_V7M4__)
        CSL_xbarIpuIrqConfigure(1, CSL_XBAR_INST_IPU1_IRQ_60, CSL_XBAR_GMAC_SW_IRQ_RX_PULSE);
        CSL_xbarIpuIrqConfigure(1, CSL_XBAR_INST_IPU1_IRQ_61, CSL_XBAR_GMAC_SW_IRQ_TX_PULSE);
    #elif defined(__ARM_ARCH_7A__)
        CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_92, CSL_XBAR_GMAC_SW_IRQ_RX_PULSE);
        CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_93, CSL_XBAR_GMAC_SW_IRQ_TX_PULSE);
    #endif
        /* Select RGMII 2 ports GMIIx_SEL = 2 for RGMII*/
        CSL_FINS (((CSL_control_coreRegs *) CSL_MPU_CTRL_MODULE_CORE_CORE_REGISTERS_REGS)->CONTROL_IO_1,
              CONTROL_CORE_CONTROL_IO_1_GMII1_SEL, 2U);
        CSL_FINS (((CSL_control_coreRegs *) CSL_MPU_CTRL_MODULE_CORE_CORE_REGISTERS_REGS)->CONTROL_IO_1,
              CONTROL_CORE_CONTROL_IO_1_GMII2_SEL, 2U);
    
        /*GMAC RESET ISOLATION Enable*/
        CSL_FINS (((CSL_control_coreRegs *) CSL_MPU_CTRL_MODULE_CORE_CORE_REGISTERS_REGS)->CONTROL_IO_2,
              CONTROL_CORE_CONTROL_IO_2_GMAC_RESET_ISOLATION_ENABLE, 0U);
        CSL_FINS (((CSL_control_coreRegs *) CSL_MPU_CTRL_MODULE_CORE_CORE_REGISTERS_REGS)->CONTROL_IO_2,
              CONTROL_CORE_CONTROL_IO_2_GMAC_RESET_ISOLATION_ENABLE, 1U);
    
    #ifdef evmAM572x
        EMAC_HwAttrs_V4 cfg;
        EMAC_socGetInitCfg(0, &cfg);
        cfg.port[0].phy_addr = GMAC_PORT1_ETHERNET_PHY_ADRESS;
        cfg.port[1].phy_addr = GMAC_PORT2_ETHERNET_PHY_ADRESS;
        EMAC_socSetInitCfg(0, &cfg);
    #endif
        Task_Params_init(&taskParams);
        taskParams.priority = 1;
        taskParams.stackSize = 0x1400;
        main_task = Task_create (TaskFxn, &taskParams, NULL);
    
    #if !defined (NIMU_DUAL_MAC_MODE) && !defined (NIMU_FTP_APP)
        Task_Params_init(&taskParams);
        taskParams.priority = 9;
        taskParams.instance->name = "EmacStats";
        Task_create(app_stats, &taskParams, NULL);
    #endif
    
        NIMUDeviceTable[nimu_device_index++].init =  &CpswEmacInit;
    
    #ifdef NIMU_DUAL_MAC_MODE
        NIMUDeviceTable[nimu_device_index++].init =  &CpswEmacInit;
    #endif
        NIMUDeviceTable[nimu_device_index].init =  NULL;
    
        BIOS_start();
    
        return -1;
    }
    
    /**
     *  \name TaskFxn
     *  \brief Task Fxn
     *  \param a0
     *  \param a1
     *  \return none
     *
     */
    void TaskFxn(UArg a0, UArg a1)
    {
    #ifdef NIMU_DUAL_MAC_MODE
        NIMU_log("\n\rSYS/BIOS Ethernet/IP (CPSW) Sample application, EVM IP address I/F 1: %s\n\r", ipAddr);
        NIMU_log("\n\rSYS/BIOS Ethernet/IP (CPSW) Sample application, EVM IP address I/F 2: %s\n\r", LocalIPAddr);
    #else
        NIMU_log("\n\rSYS/BIOS Ethernet/IP (CPSW) Sample application, EVM IP address I/F 1: %s\n\r", LocalIPAddr);
    #ifndef NIMU_FTP_APP
        /* Basic Example completes here */
        UART_printStatus("\n All tests have passed.\n");
    #endif
    #endif
    #ifdef NIMU_FTP_APP
        ftpserver_init();
    #endif
    }
    
    /*
     * ======== stackInitHook ========
     * hook called from ti_nkd_config_Global_stackThread() to run user setup code
     */
    void stackInitHook(void* hCfg)
    {
    #ifdef NIMU_DUAL_MAC_MODE
        CI_IPNET NA;
        CI_ROUTE RT;
    
    
        /* Add IP address for interface 1 */
        NA.IPAddr = inet_addr(ipAddr);
        NA.IPMask = inet_addr(ipMask);
        CfgAddEntry(hCfg, CFGTAG_IPNET, 1, 0, sizeof(CI_IPNET),
                    (uint8_t *)&NA, 0);
    
        /*
         * Add gateway for interface 1
         * --> I *think* the below should work but you may need different values ...
         */
        bzero(&RT, sizeof(RT));
        RT.IPDestAddr = 0;
        RT.IPDestMask = 0;
        RT.IPGateAddr = inet_addr(ipGateway);
    
        CfgAddEntry(hCfg, CFGTAG_ROUTE, 0, 0,
                    sizeof(CI_ROUTE), (uint8_t *)&RT, 0);
    #endif
    }

  • Could you share a picture of your cable connection to the board?

  • Hi;
    My connection cable comes with the IDK board.

    The following picture shows the xds100v2 driver information of win10.

    The following picture shows the test connect information in CCS.

    Best regards.

  • Do you use a bench power supply for the board? If yes, what is the current limit setting?

    If you use power supply plugged into wall, what is the current rating of the power adapter?

    From the CCS error message, it looks like maybe some power glitch to the board.

  • First of all, thank you very much for your help.
    I use a power adapter to supply power. I carefully read the rated current parameters of the board: "This external power supply is rated for
    an output voltage of +5VDC with an output current up to 6.5A. "
    The rated current of the power adapter I used before is 1A. There is no 6.4A power adapter around me now. I used a 3A power adapter. Then I was able to successfully run through the examples without problems.