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.

Compiler/TMS320C5535: Wrong Result while loading code in DSP through SD card

Part Number: TMS320C5535

Tool/software: TI C/C++ Compiler

Hi all,

I am using ezdsp5535 board and written down the code for 2048 point FFT by using HWAFFT. After getting FFT results (Floating point array) i have found out maximum value  in FFT bin. then i have compared this maximum value with one fixed value(A). if (Max>A), it should blink 2 leds else it should blink 3 leds. both Max and A (0.75) are floating point. Since max value is 0.99985, only 2 led should be blink. On code composer it is working correctly. But when i created bin file and copied in SD card, while running through SD card, 3 leds are blinking means it is going in else loop. 

Kindly help.

If any further details required, Please let me know.

  • Hi,

    I've notified the sw team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Megha,

    I noticed that you have a duplicate thread e2e.ti.com/.../602778 on the same topic. Would appreciate it if you could please close that thread.

    To address your question, do you have a .out file that you created your .bin file from? can you post that here?
    Also, did you follow these instructions on creating the .bin? processors.wiki.ti.com/.../Creating_a_SD_card_boot_image_for_C55x

    Lali
  • Hi Lali,

    Thank you for your response.  I am attaching here .out file of the main program.

    I have used following documents for creating bootable file. Path for this file is  C:\ti\ccsv4\emulation\boards\ezdsp5535_v1\boot_post_SDcard.

    i have tried led test example. It was working fine.

    Thanks in advance 

    Megha

    Creating_Bootable_Demo.txt
    Creating a Bootable Demo
    ------------------------
    This file contains instructions for creating and flashing a bootable demo into the SD card that will run when the eZDSP is powered.
    
    There are three major steps in flashing the demo.
    1. Creating the demo program.
    2. Creating the boot image.
    3. Programming the boot image.
    
    Creating the demo program
    -------------------------
        This is a program that runs when the eZDSP is powered. Create a project with all the necessary setup and build it  to get a .out file. The "boot_post" test can be used for this.
    Creating the boot image
    -----------------------
    The demo program needs to be converted to a bootable format for the boot image. This can be done by the following steps.
    1. Copy the Demo program (.out file) to the folder "ezdsp5535_v1\boot_post\hex_utility".
    2. In that directory, edit the last line and second last line of "demo.cmd" to reflect the input (.out) and output (.bin) file respectively.
    3. Go to the Windows command prompt and change directory to the "hex_utility" directory.
    4. Enter the following command in the command prompt:
       hex55 demo.cmd
    5. The output .bin file will be created in the same directory.
    
    Programming the boot image
    --------------------------
    This involves loading  boot image to the SD card. 
    
    1. Rename the .bin file to "bootimg#.bin" where '#' denotes a character or number.
    2. Make a backup of the .bin file in the SD card that was provided with the eZDSP or move it to a sub directory.
    3. Copy the "bootimg#.bin" file that was created to the SD card. It should be in the top level with out any sub directories.
    4. Remove all other .bin files from the top level. Bootloader will not look inside subdirectories so other boot images may be stored there.
    5. Insert the SD card into the eZDSP and power it. The program will run when powered on.

    7343.Creating_Bootable_Demo.txt
    Creating a Bootable Demo
    ------------------------
    This file contains instructions for creating and flashing a bootable demo into the SD card that will run when the eZDSP is powered.
    
    There are three major steps in flashing the demo.
    1. Creating the demo program.
    2. Creating the boot image.
    3. Programming the boot image.
    
    Creating the demo program
    -------------------------
        This is a program that runs when the eZDSP is powered. Create a project with all the necessary setup and build it  to get a .out file. The "boot_post" test can be used for this.
    Creating the boot image
    -----------------------
    The demo program needs to be converted to a bootable format for the boot image. This can be done by the following steps.
    1. Copy the Demo program (.out file) to the folder "ezdsp5535_v1\boot_post\hex_utility".
    2. In that directory, edit the last line and second last line of "demo.cmd" to reflect the input (.out) and output (.bin) file respectively.
    3. Go to the Windows command prompt and change directory to the "hex_utility" directory.
    4. Enter the following command in the command prompt:
       hex55 demo.cmd
    5. The output .bin file will be created in the same directory.
    
    Programming the boot image
    --------------------------
    This involves loading  boot image to the SD card. 
    
    1. Rename the .bin file to "bootimg#.bin" where '#' denotes a character or number.
    2. Make a backup of the .bin file in the SD card that was provided with the eZDSP or move it to a sub directory.
    3. Copy the "bootimg#.bin" file that was created to the SD card. It should be in the top level with out any sub directories.
    4. Remove all other .bin files from the top level. Bootloader will not look inside subdirectories so other boot images may be stored there.
    5. Insert the SD card into the eZDSP and power it. The program will run when powered on.
    1778.Creating_Bootable_Demo.txt
    Creating a Bootable Demo
    ------------------------
    This file contains instructions for creating and flashing a bootable demo into the SD card that will run when the eZDSP is powered.
    
    There are three major steps in flashing the demo.
    1. Creating the demo program.
    2. Creating the boot image.
    3. Programming the boot image.
    
    Creating the demo program
    -------------------------
        This is a program that runs when the eZDSP is powered. Create a project with all the necessary setup and build it  to get a .out file. The "boot_post" test can be used for this.
    Creating the boot image
    -----------------------
    The demo program needs to be converted to a bootable format for the boot image. This can be done by the following steps.
    1. Copy the Demo program (.out file) to the folder "ezdsp5535_v1\boot_post\hex_utility".
    2. In that directory, edit the last line and second last line of "demo.cmd" to reflect the input (.out) and output (.bin) file respectively.
    3. Go to the Windows command prompt and change directory to the "hex_utility" directory.
    4. Enter the following command in the command prompt:
       hex55 demo.cmd
    5. The output .bin file will be created in the same directory.
    
    Programming the boot image
    --------------------------
    This involves loading  boot image to the SD card. 
    
    1. Rename the .bin file to "bootimg#.bin" where '#' denotes a character or number.
    2. Make a backup of the .bin file in the SD card that was provided with the eZDSP or move it to a sub directory.
    3. Copy the "bootimg#.bin" file that was created to the SD card. It should be in the top level with out any sub directories.
    4. Remove all other .bin files from the top level. Bootloader will not look inside subdirectories so other boot images may be stored there.
    5. Insert the SD card into the eZDSP and power it. The program will run when powered on.

  • Megha,
    I don't see the .out attached.

    Lali
  • Lali

    Not able to post  .out file through e2e. Showing error for file extension.

    Can i send over mail. Or suggest any other option.

    --Megha

  • Lali

    Not able to post .out file through e2e. Showing error for file extension or URL problem.

    Can i send over mail. Or suggest any other option.

    --Megha
  • Megha,
    Try to rename the file to .txt and attach?
    If not post the project contents to build locally.

    Lali
  • Hi lali,

    thanks your response. I rename the file with .txt and attaching here.

    With regards

    FFT_2048_new.txt

  • Megha,

    When you are testing the .out file with CCS, are you using a GEL file to initialize the core? Could you please try to remove the GEL so that the core is not initialized and then try to run the .out? Do you still see the 3 LEDs blink then?

    I'm trying to figure out if its something to do with the bootloading the chip.

    Lali
  • Megha,
    To add to my previous thread, you can add the pll_sample() function to the start of your program as in C:\ti\c55_lp\c55_csl_3.07\ccs_v6.x_examples\pll\CSL_PLL_Example\csl_pll_example.c

    This will initialize the DSP correctly. I suspect this is the issue you are facing.

    Lali
  • Hi Lali,
    I am not using any GEL file with .out file on ccs.
    I also tried by adding pll_sample() function in the code. But still i am facing same issue.
    Kindly suggest some other solution.

    With thanks & regards
    Megha
  • Hi Lali,

    This is a gentle reminder for my previous mail.

    With regards

     

  • Megha,

    Please try adding the following to the beginning of main() to un-idle the FFTHWA after boot:

        // Enable HWA, CPU, DPORT, MPORT, XPORT, and IPORT in ICR */
        *(volatile ioport Uint16 *)(0x0001) = 0x000E;
        /* Execute idle instruction */
        asm("    idle");

    This is in relation to section 2.1.5 of http://www.ti.com/lit/er/sprz373c/sprz373c.pdf

    Lali

  • Hi Lali,

    Thanks a lot for your continuous support. I added the code lines as suggested by you in previous mail. Now my module is working fine and giving correct output.

    Once again thanks.

    With regards

    Megha