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.

Spectrum Digitlat TMS320C5515 external FLASH running Code



Mark and Others,

 

I'm inching closer to getting the code that Mark sent to work with the Spectrum Digital TMSc5515evm board.

The issues with the reset,  linker and memory map are fixed. This was solved by using the Bootloader to load the program and then when Code Composer is launched only program the "applicatin" symbols.

 

Now I have another issue, which I need some assistance on.  I have inserted two image . The first is the results of using the simulator to see what was loaded for the function. This data is good. I'm able to step and run through the application.

 

 

Below is the results of running the actual application. The code seems to be corrupted or maybe wasn't actually loaded into the desiginated external memory location:

 

 

  • Hi Conrad,

    Sorry for the delay.

    The reason why this piece of software does not run on the C5515 EVM is because it was actually written for the C5505 EVM, which has an optional SRAM connected to CS5. On the C5515 EVM, there is no SRAM and there is nothing connected to CS5.

    You should load the emif_sram_exe object file to the SDRAM instead, connected to CS0 on the C5515 EVM.

    Change the following lines in the .cmd file:

        .text:sram_text : > EMIF_CS0
        {
            .\emif_sram_exe.obj(.text)
        }
        .bss:sram_data : > EMIF_CS0
        {
            .\emif_sram_exe.obj(.bss)
        }

    You can use the default GEL file for the C5515 EVM because it initializes the SDRAM and allows CCS to load data/ code to this address.

    I've also attached a zip file of the project that I modified. I started with the same project that I sent you earlier.

    8738.RunFromEMIF_MM.zip

    Hope this helps,
    Mark

  • Hello Mark,

    I'm breathing a little easier. However, I have tried to use the code that you modified and have converted it from the main_test.out to main_test.bin(used hex55 -i main_test.out -o main_test.bin -b -boot -v5505 -serial8) and next used the programmer to load this into the external NAND flash. Once this was done I load the project symbols and stepped  into the program. When the program counter hits the emif_sram_function the CCSv5 hangs.

     

    In CCSv5 debugger, I have looked at the emif_sram_byte description which is located at 0x50200 and there seems to be garbage there.  A Mr. Joe Stellaris at TI mentioned that for the Stellaris micro controller that the "default debugger will not be aware of the existence of external memory......" he mentions that this has to be modified, could this be the reasons that I do not see valid data at location once the bootloader is used to load the function and CCSv5 is used to step through the code?

     

    Please, Mark I do not want to loose this connection. I need reasonable and expeditious response.

     

    Thanks again for what you have been doing to assist me.

     

     

  • Hi Conrad,

    Conrad Thomas said:
    When the program counter hits the emif_sram_function the CCSv5 hangs.

    When you reset the EVM, the contents of SDRAM are lost - therefore when you try to execute from SDRAM it is expected that nothing will happen.

    Do you need to execute from SDRAM or can you execute from some other non-volatile memory like NOR or NAND?

    Conrad Thomas said:
    default debugger will not be aware of the existence of external memory......

    The GEL file includes SDRAM routines to...

    Tell CCS that SDRAM resides at 0x50000 and is 0x7B0000 in length:

        GEL_MapAdd(0x050000,0,0x7B0000,1,1);    /* External-SDRAM */

    Initalize the DSP's EMIF for communication with SDRAM:


    SDRAM_INIT()
    {
        int i;

        /* reset EMIF */
        *(short *)PRCR@IO = 0x0002;
        for(i=0;i<0xff;i++);

        //enable SDRAM clock
        *(short*)CLKCFGL@IO=0x0001;

        /* enable word writes to EMIF regs */
        *(short *)ESCR@IO = 0;

        /* step 1 */
        *(short *)SDTIMR1@IO = 0x4710;
        *(short *)SDTIMR2@IO = 0x3911;
        *(short *)SDSRETR@IO = 0x0007;

        /* step 2 */
        *(short *)SDRCR@IO = 0x04E3;
        
        /* step 3 */
        *(short *)SDCR1@IO = 0x4720;
        *(short *)SDCR2@IO = 0x0001;

        /* step 4 */
        for(i=0;i<0xff;i++);

        /* step 5 */
        *(short *)SDRCR@IO = 0x061A;

        GEL_TextOut("SDRAM Initilization Complete.\n");
    }

    Take a look at the CCS memory window configuration in the below screen shot to understand the addressing required for Program and Data memories:

    Hope this helps,
    Mark

  • Hello Mark,

    I do have external NAND flash. Do I need to only exchange the


    .text:sram_text : > EMIF_CS4

    {

    \emif_sram_exe.obj(.text)

    }

    .bss:sram_data : > EMIF_CS4

    {

    \emif_sram_exe.obj(.bss)

    }

    Or there something else that is needed to get it to work from the external NAND?

    Thanks,

    Conrad

  • Hello Mark,

     

    The Spectrum Digital Board has a NAND Flash which is assigned to Chip Enable line 4. I have attached a edited project that I have tried to create a new gel file("NAND_evm5515.gel" that includes the NAND FLASH and EMIF initialization. I used TI's Peter Chungs answer to EVM5505 3.3V Memory Daughter Card. Please not that the Spectrum Digital NANDs are 1.8 Volts. Additionally, I changed the

    .text:sram_text : > EMIF_CS0

    {

    C:\Users\conrad.thomas\workspace_v5_1\8738.RunFromEMIF_MM\RunFromEMIF_MM\Debug\emif_sram_exe.obj(.text)

    }

     

    .bss:sram_data : > EMIF_CS0

    {

    C:\Users\conrad.thomas\workspace_v5_1\8738.RunFromEMIF_MM\RunFromEMIF_MM\Debug\emif_sram_exe.obj(.bss)

    }

     


    into:::::::

    .text:sram_text : > EMIF_CS4

    {

    C:\Users\conrad.thomas\workspace_v5_1\8738.RunFromEMIF_MM\RunFromEMIF_MM\Debug\emif_sram_exe.obj(.text)

    }

     

    .bss:sram_data : > EMIF_CS4

    {

    C:\Users\conrad.thomas\workspace_v5_1\8738.RunFromEMIF_MM\RunFromEMIF_MM\Debug\emif_sram_exe.obj(.bss)

    }

    Here what CCSv5 says:

    C55xx: GEL Output: Reset Peripherals is complete.

    C55xx: GEL Output: Configuring PLL (100.00 MHz).

    C55xx: GEL Output: PLL Init Done.C55xx: GEL Output: SDRAM Initilization Complete.

    C55xx: GEL Output: EMIF Initilization for 3.3V card is complete.

    C55xx: GEL Output: Target Connection Complete.

    C55xx: File Loader: Data verification failed at address 0x00E00200 Please verify target memory and memory map.

    C55xx: GEL: File: C:\Users\conrad.thomas\workspace_v5_1\8738.RunFromEMIF_MM\RunFromEMIF_MM\Debug\main_test.out: a data verification error occurred, file load failed.

    Please advise what needed to get it to operate with the Spectrum Digital external NAND FLASH.

     

     

    Also, I have attached the edited project file:

    0878.8738.RunFromEMIF_MM_NAND.zip

     

    Thanks for your consideration.

     

  • Hello Mark,

     

    Today, June/13/12, will be a couple of days since our last communication. If you can direct me on how to solve this last issue then we could put this to rest.

     

    Question. Is it possible to use CCSv5 and see memory update via the MEMORY view when I write into FLASH?  FYI,   can see memory update via the MEMORY view if I'm in the simulator. Also, I have verified that the vaules within src is written into the FLASH NAND part.. Yet I do not see it if I loook into the Memory viewer. I thought that memcpy would update and allow me to see it.

    A snippit of code that I have tried to use is this.

       nand_writePage(0xC5000, src, 0x10);

       memcpy((void *)(0xC5000/2), (void *)sdram_base, 0x10);

    Can I encourage you to respond before you leave today?

     

    Please consider what I have asked.

     

    Conrad