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.

DSP code executes successfully when loaded with a Debugger but fails when booting through EMIFA

Other Parts Discussed in Thread: AM3892, TMS320C6457

Hi,

We have a EDMA code written with EDMA 2 APIs CSL libraries. The program works fine when loaded thru the debugger, but when we create a hex file and load it from an memory through EMIFA interface, it boots successfully but it hangs when the EDMA 2 APIs are called/encountered. We are not understanding why.

In the Code, We are glowing several LEDs, hence we are able to narrow it down to where it is not not working. The CPU hangs wen the 1st EDMA API is called i.e. EDMA_intResetAll() in the attached code. There is also an comment in the code telling till where it works.

Kindly help us. Please let us know where we are going wrong.

Attached the whole project in .rar file.

Regards

Akshay S Bharadwaj

EDMA_TEST.rar
  • Akshay,

    Generally, the difference between a program loaded through CCS vs. a program loaded from a boot mode is the GEL file.

    There is usually a GEL file associated with your Target Configuration, and when the debugger is logically connected and when a program is loaded, things will run automatically run to initialize parts of the device and/or board.

    The solution may be:

    1. Remove the GEL script from the Target Configuration, load the program, and see if it works right or works like the Flash does.

    2. If the program fails like the boot mode does, then the problem is that there is additional initialization needed. This initialization is being done in the GEL file and needs to be copied into the program so it will be done in the boot process or by the program at the beginning of main().

    You may want to go to the Wiki and search for "debugging boot" (no quotes) to find a topic that can help with debugging boot issues.

    Regards,
    RandyP

  • Hello RandyP,

    Thanks for your quick response,

    1. Remove the GEL script from the Target Configuration, load the program, and see if it works right or works like the Flash does.

    I am not using GEL script  both in debugging and Memory boot mode, I am just mentioning in TCF file upon reset go to bootcode, i.e,there is a bootcode.asm file which copies the application to internal memory and it works fine .

    2. If the program fails like the boot mode does, then the problem is that there is additional initialization needed. This initialization is being done in the GEL file and needs to be copied into the program so it will be done in the boot process or by the program at the beginning of main().

    Yeah everything is working fine, when we do memory boot its booting fine and going to main when some of the below mentioned API comes the system gets hung and it works fine in debugging mode

    So far we have tested
    These APIs are working fine
     CSL_intcGlobalNmiEnable();
        /* Enable all interrupts *//*API is working fine*/
      CSL_intcGlobalEnable(&state);
        /* Init GPIO *//*API is working fine*/
     CSL_gpioInit(&pContext);
    /* Intialise EDMA 3 */
     CSL_edma3Init(&Econtext);
        /* Enable NMIs *//*API is working fine*/
         CSL_intcGlobalNmiEnable();
         /* Enable global interrupts *//*API is working fine*/
         CSL_intcGlobalEnable(&state);
    But  its getting stuck at these APIs 
     CSL_pscInit(NULL);
     EDMA_intResetAll ();
    EDMA_intEnable(tccNo);
    EDMA_intClear(tccNo);
     
    Also find the attached project where some of above APIs are Implemented.

    Regards,
    Akshay

    EDMA_TEST.rar
  • Hi Akshay,

    Randy suspect ion on your problem is perfect,

    How you are flashing the your app on flash (converted to AIS) ?

    Could you please attach your .cfg file used for AIS conversion if any.

    Please refer the following TI wiki

    http://processors.wiki.ti.com/index.php/OMAP-L138_Bootloader#Why_does_my_program_work_in_CCS_but_doesn.27t_boot_from_Flash.3F

  • Titusrathinaraj Stalin

    How you are flashing the your app on flash (converted to AIS) ?

    My design consists of an AM3892 ARM processor, Altera FPGA, and four TMS320C6457. The out file which is created by the CCS in converted into HEX file using the hex6x.exe conversion utility. This hex file is written to the FPGA memory through which the DSP is booting via EMIFA interface.

    The Problem we are facing is not with booting, but with certain APIs which hang the CPU core. we are glowing certain LEDs to zero in on where the execution is getting hanged. The List of APIs which we are facing the problem with was listed in the previous post.

    When we try and connect it through the debugger, it runs successfully.

    Could you please attach your .cfg file used for AIS conversion if any.

    Please unrar the attachment in the previous post, you will get the whole project.

    Regards

    Akshay