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.

C6745 External SDRAM

Other Parts Discussed in Thread: TMS320C6745

Hello.

When the device (TMS320C6745) is taken out of reset, he copied data from external flash (W25X32) to internal SHDSPL2RAM - > it's works good.

But the  SHDSPL2RAM memory space is only 256-KB and it is not enough for my application.

1) Tell me please, may be not all of section need copy from external flash to the SHDSPL2RAM memory space (Without external SDRAM).

2) If I am using external SDRAM, how to distribute the section between  SHDSPL2RAM and SDRAM. For example:  section -> text  must be locate in SHDSPL2RAM  or SDRAM. May be section -> text,  can be left on external flash.

This is my cmd file:

MEMORY
{
DSPL2ROM o = 0x00700000 l = 0x00100000 /* 1MB L2 Internal ROM */
DSPL2RAM o = 0x00800000 l = 0x00040000 /* 256kB L2 Internal RAM */
DSPL1PRAM o = 0x00E00000 l = 0x00008000 /* 32kB L1 Internal Program RAM */
DSPL1DRAM o = 0x00F00000 l = 0x00008000 /* 32kB L1 Internal Data RAM */
SHDSPL2ROM o = 0x11700000 l = 0x00100000 /* 1MB L2 Shared Internal ROM */
SHDSPL2RAM o = 0x11800000 l = 0x00040000 /* 256kB L2 Shared Internal RAM */
SHDSPL1PRAM o = 0x11E00000 l = 0x00008000 /* 32kB L1 Shared Internal Program RAM */
SHDSPL1DRAM o = 0x11F00000 l = 0x00008000 /* 32kB L1 Shared Internal Data RAM */
EMIFACS2 o = 0x60000000 l = 0x02000000 /* 32MB Async Data (CS2) */
EMIFACS3 o = 0x62000000 l = 0x02000000 /* 32MB Async Data (CS3) */
EMIFACS4 o = 0x64000000 l = 0x02000000 /* 32MB Async Data (CS4) */
EMIFACS5 o = 0x66000000 l = 0x02000000 /* 32MB Async Data (CS5) */
EMIFBSDRAM o = 0xC0000000 l = 0x10000000 /* 256MB SDRAM Data */
}

SECTIONS
{
.isr_vectors > SHDSPL2RAM
.text > SHDSPL2RAM
.stack > SHDSPL2RAM
.bss > SHDSPL2RAM
.cio > SHDSPL2RAM
.const > SHDSPL2RAM
.data > SHDSPL2RAM
.switch > SHDSPL2RAM
.sysmem > SHDSPL2RAM
.far > SHDSPL2RAM
.args > SHDSPL2RAM
.ppinfo > SHDSPL2RAM
.ppdata > SHDSPL2RAM

/* COFF sections */
.pinit > SHDSPL2RAM
.cinit > SHDSPL2RAM

/* EABI sections */
.binit > SHDSPL2RAM
.init_array > SHDSPL2RAM
.neardata > SHDSPL2RAM
.fardata > SHDSPL2RAM
.rodata > SHDSPL2RAM
.c6xabi.exidx > SHDSPL2RAM
.c6xabi.extab > SHDSPL2RAM
}

I would appreciate if you could give me the examples.

Great Thanks.

  • Hi,


    1) Tell me please, may be not all of section need copy from external flash to the SHDSPL2RAM memory space (Without external SDRAM).


    All of the sections are required to load from external flash to RAM.
    If your code size is exceeding from 256KiB then better to use the external flash.


    2) If I am using external SDRAM, how to distribute the section between SHDSPL2RAM and SDRAM. For example: section -> text must be locate in SHDSPL2RAM or SDRAM. May be section -> text, can be left on external flash.

    If you have external RAM then you can locate all the sections in external RAM (EMIFBSDRAM ).
    For some of the examples, we need to keep interrupt vectors portion needs to be in internal RAM.


    Use the following linker command file to run the any example on external RAM on C6745 device.

    MEMORY
    {
    DSPL2ROM o = 0x00700000 l = 0x00100000 /* 1MB L2 Internal ROM */
    DSPL2RAM o = 0x00800000 l = 0x00040000 /* 256kB L2 Internal RAM */
    DSPL1PRAM o = 0x00E00000 l = 0x00008000 /* 32kB L1 Internal Program RAM */
    DSPL1DRAM o = 0x00F00000 l = 0x00008000 /* 32kB L1 Internal Data RAM */
    SHDSPL2ROM o = 0x11700000 l = 0x00100000 /* 1MB L2 Shared Internal ROM */
    SHDSPL2RAM o = 0x11800000 l = 0x00040000 /* 256kB L2 Shared Internal RAM */
    SHDSPL1PRAM o = 0x11E00000 l = 0x00008000 /* 32kB L1 Shared Internal Program RAM */
    SHDSPL1DRAM o = 0x11F00000 l = 0x00008000 /* 32kB L1 Shared Internal Data RAM */
    EMIFACS2 o = 0x60000000 l = 0x02000000 /* 32MB Async Data (CS2) */
    EMIFACS3 o = 0x62000000 l = 0x02000000 /* 32MB Async Data (CS3) */
    EMIFACS4 o = 0x64000000 l = 0x02000000 /* 32MB Async Data (CS4) */
    EMIFACS5 o = 0x66000000 l = 0x02000000 /* 32MB Async Data (CS5) */
    EMIFBSDRAM o = 0xC0000000 l = 0x10000000 /* 256MB SDRAM Data */
    }

    SECTIONS
    {
    .isr_vectors > EMIFBSDRAM
    .text > EMIFBSDRAM
    .stack > EMIFBSDRAM
    .bss > EMIFBSDRAM
    .cio > EMIFBSDRAM
    .const > EMIFBSDRAM
    .data > EMIFBSDRAM
    .switch > EMIFBSDRAM
    .sysmem > EMIFBSDRAM
    .far > EMIFBSDRAM
    .args > EMIFBSDRAM
    .ppinfo > EMIFBSDRAM
    .ppdata > EMIFBSDRAM

    /* COFF sections */
    .pinit > EMIFBSDRAM
    .cinit > EMIFBSDRAM

    /* EABI sections */
    .binit > EMIFBSDRAM
    .init_array > EMIFBSDRAM
    .neardata > EMIFBSDRAM
    .fardata > EMIFBSDRAM
    .rodata > EMIFBSDRAM
    .c6xabi.exidx > EMIFBSDRAM
    .c6xabi.extab > EMIFBSDRAM
    }

  • Ok, great thanks for the quick response!

    In the near future I will try your example, and write about the results.
    Thanks.
  • Yes sure.
    Thanks for your update.
  • Hello.
    I have some problem, when I run my program in debug mode.

    C674X_0: GEL Output:
    c6747 DSP Startup Sequence

    C674X_0: GEL Output: Setup PINMUX Registers...C674X_0: GEL Output: [Done]
    C674X_0: GEL Output: PLL Setup Complete
    C674X_0: GEL Output: Setup Power Modules (All on)...C674X_0: GEL Output: [Done]
    C674X_0: GEL Output: SDRAM Setup Complete
    C674X_0: GEL Output:
    Startup Complete.

    C674X_0: GEL Output:
    C674X_0: File Loader: Verification failed: Values at address 0x00000000C000C000 do not match Please verify target memory and memory map.
    C674X_0: GEL: File: C:\ti\Workspace\McASP_EDMA\Debug\McASP_EDMA.out: a data verification error occurred, file load failed.


    Tell me please, where there may be a mistake ?
    Thanks.
  • I am find one mistake in my code.
    I have 256MBIT chip SDRAM on my board, but EMIFB SDRAM Data space in C6745 DSP is 128MBIT.

    So, the code must be:
    EMIFBSDRAM o = 0xC0000000 l = 0x7FFFFFF /* 128MB SDRAM Data */

    But this hotfix does not resolve the problem.
    C674X_0: File Loader: Verification failed: Values at address 0x00000000C000C000 do not match Please verify target memory and memory map.
    C674X_0: GEL: File: C:\ti\Workspace\McASP_EDMA\Debug\McASP_EDMA.out: a data verification error occurred, file load failed.
  • Hello.

    I have some misunderstanding about the max size  of SDRAM.

    I have the next hardware configuration:

    TMS320C6745 + AS4C16M16S (16M x 16 bit Synchronous DRAM (SDRAM)) - 256Mb

    In SPRS377F document I find the next information:

    Please, tell me: my hardware configuration is correct? May be I must use the 128Mb SDRAM ?

    Thanks.

  • Hi,
    Yes, you must to use up to 128MiB only.