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.

TMDSDSK6713: SDRAM Configuration Error on DSK6713

Part Number: TMDSDSK6713

Hi. I am Ammar and working on a real time audio processing project on DSP Kit  DSK6713 . I need more memory for my Code and trying to use SDRAM but it gives an error because when I call malloc why does it return 0x000000 ? 

Gel file is attached. Kindly help if I need to make changes in the gel file. Kindly tell if any changes or any configuration is needed.

Regards

8156.dsk6713.gel

  • Hi Ammar,

    When you connect to the target, the OnTargetConnect() function in the GEL file is called automatically.
    In this GEL the only thing OnTargetConnect does is init_emif();. I think it should also run init_pll() and setup_memory_map().

    After connecting, can you use the GEL dropdown menu to perform these additional steps manually in the following order?
    Memory Map --> SetMemoryMap()
    DSK6713 Functions --> init_pll()
    DSK6713 Functions --> InitCpld()
    DSK6713 Functions --> init_emif();
    Check DSK --> QuickTest() (and report to us what is printed)

    You should then be able to open the Memory Window at address 0x80000000. You should be able to write arbitrary hex values and read them back from the same addresses you wrote to. Let us know if you get an error or read back some bad data like all 0's or all F's.

    The Get_Board_Rev define seems to configure SDRAM for the 8Mb SDRAM (4M x 32 MT48LC4M32B2TG) instead of the 4Mb SDRAM (2M x 32 MT48LC2M32B2TG).

    Can you confirm on your board...
    * Board revision
    * Marking on SDRAM (U13) is 2M32B2 or 4M32B2
    * JP500 & JP501 jumper setting
    - for 2M32, both should short from positions A to B (1 to 2)
    - for 4M32, both should short from positions B to C (2 to 3)

    The EMIF clock is derived from the PLL settings and should be configured in software at 90MHz. This number is based on an internal PLL clock of 450MHz required to achieve 225 MHz operation with a divisor of 2 and a 90MHz EMIF clock with a divisor of 5. - refer to 6713_dsk_techref.pdf available from Target Docs
    link on c6000.spectrumdigital.com/.../

    Refer also to the 6713_dsk_quickstartguide.pdf, which has good advice like the below (though its a little out of date)...
    Make sure all of the Configuration Switches (SW3) are set in the off position. This configures the DSK for the factory default settings of little endian processor mode booting out of the on-board Flash memory.

    Eventually, you will need to move all the initialization, including SDRAM, into your program. I will look for a program that includes this init step. There may also be a better GEL file out there somewhere.

    Let us know how it goes.

    Regards,
    Mark
  • Thanks for your reply Mark. I have configured the SDRAM. But now my program is running much much slower. The function which was taking 30ms is now taking upto 280ms.

    What should I do? Can you suggest me any DSP kit or evaluation module in Floating point with internal memory upto 1MB ?  I am stuck in the project only due to memory and speed.

    I am working on real time audio processing project currently on DSK6713 and I need speed as well as memory. Speed is reduced much if I use SDRAM. I need any kit not a processor because there is no time for PCB designing.

    Kindly Help

    Regards

  • Hi Ammar,

    So you are able to write and read from SDRAM now?

    Can you clarify?
    Is the execution slower when you map your code to SDRAM verses when the code is mapped to internal memory?
    Or is the execution slower after configuring the PLLs with the GEL file (regardless of where the code is executing from)?

    =-=-
    If its slower to execute code from SDRAM, are you certain you have utilized the internal memory completely? Do you have any cache enabled? Refer to Figure 2. L2 Memory Configuration of the datasheet for cache vs SRAM options. You can use upto 256K fo SRAM with no cache enabled. Could you attach your .cmd file and .map file to see where the code is being linked to? Let me know if you need help here.
    What sort of processing are you doing that runs out of memory? Storing several audio samples or something?

    =-=-
    If its executing slower after running the PLL init from the GEL then...
    If you have access to an oscilloscope, you can probe a couple CLKOUT pins to prove they are running at their fastest rates.

    CLKOUT2 (SYSCLK2) and ECLKOUT (EMIF output clock) at the J1 header. SYSCLK2 rate must be exactly half of SYSCLK1 (Device Speed (DSP Core)). ECLKIN = CLKIN = 50 MHz

    The DSK6713 has the GDP version of the C6713 processer, which can operate upto 300MHz. The GEL PLL init appears to be setting things up for 225MHz. You can recalculate the multiplier and dividers to get the system clock to its maximum 300MHz, while satisfying max frequencies for other peripherals.

    Refer to this thread also - internal memory will always execute faster than SDRAM.
    CCS/TMDSDSK6713: Why Code Runs Slower When I Run from SDRAM in DSK6713 @100Mhz?
    e2e.ti.com/.../656341

    The C6713 is well suited for real-time audio processing. Usually the code size for these applications is able to fit within the internal memory. Sometimes large codec algorithms have to be pulled in from off-chip memory and then run from internal memory (ie if you want to encode/decode from MP3 verses AAC, etc.)

    There are of course faster processors with larger internal memories available.
    C6747 and C6748 come to mind... each also have dev kits...
    www.ti.com/.../tmdsoskl137
    processors.wiki.ti.com/.../TMS320C6713_to_TMS320C6747_Migration_Guide

    www.ti.com/.../tmdslcdk6748
    processors.wiki.ti.com/.../TMS320C6713_to_TMS320C6748_Migration_Guide

    Regards,
    Mark
  • Thanks Mark. I am doing real time audio processing with much processing like encoding, modulation etc. So I need atleast 1MB memory and also i need higher speed. The two kits you mentioned have speeds only below 500MHz like 300 or 400.
    I am using DSK6713. MY execution is slower when I map the .text part of my code to SDRAM verses when the code is mapped to internal memory

    Regards
  • SDRAM was working very slow I am moving towards high speed and large memory kit DSK6455