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.

external ram with 28335

hi everybody:

I add a external ram IS61LV51216 on my 28335 board, as shown below.My question is how can I map the ram to zone7 in programm. Can it be maped to zone6? What's the deference in programm?

  • Zhang,

    You have the SRAM mapped to Zone6 because you have connected the XZCS6n pin on the F28335 to the CEn pin on the SRAM.  If you want to map it to Zone7, you would connect XZCS7n to CEn.  Both program and data space are mapped together.  There are no separate strobes for program and data, just the XZCSn strobes.

    It should matter to you whether you have the SRAM mapped to zone6 or zone7.  The only difference between the two is the base address of the zone.

    Regards,

    David

  • Hi David
    Thank you for your reply.
    There is a little mistake about you. I have connected the XZCS7n pin on the F28335 to the CEn pin on the SRAM, so only zone7 can be mapped .

    The cmd file is modified refer to a exmpale

    MEMORY
    {
    PAGE 0 :
    ...
    ZONE7A : origin = 0x200000, length = 0x040000 /* XINTF zone 7 - program space */
    ...

    PAGE 1 :
    ...
    ZONE7B : origin = 0x240000, length = 0x040000 /* XINTF zone 7 - data space */
    }


    SECTIONS
    {

    codestart : > BEGIN, PAGE = 0
    ramfuncs : LOAD = ZONE7A,
    RUN = RAML0,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    PAGE = 0

    xintfloadfuncs : > ZONE7A,
    {
    rts2800_fpu32.lib<memory.obj,memmov.obj,memcpy_ff.obj,sqrt.obj,atan2.obj,asin.obj,cos.obj,sin.obj,fs_div.obj,l_div.obj,i_div.obj,u_div.obj,exit.obj,_lock.obj>(.text)
    }
    PAGE = 0
    .text : > ZONE7A, PAGE = 0
    ...

    }

    and the XINTF_Enable() is uncommmented in gel file.

    another question is when i load the .out file, will ccs write program and data to zone7 automatically ? and will ccs set XZCS7n to 0 and xwe0 to 1 automatically ?


    regards
    zhang
  • Zhang,

    You're right, I made a mistake. You are using Zone7. I just typed up my response incorrectly after looking over your first post and schematic. As I mentioned, Zone6 or Zone7, no difference in terms of what you are asking.

    The XINTF_Enable() function is there in the GEL file for exactly what you want to do. That is, have CCS load program and/or data into external memory. You should modify the function, if needed, to correspond to whatever is needed for your particular system. If configured correctly by the GEL function, the XINTF will operate correctly (e.g., XZCS7n and XWE0 will strobe as needed). CCS doesn't specifically control the interface signals. Rather, CCS goes to do a write or read through JTAG, and the access will get channeled to the XINTF which then does what it needs to do.

    Note that linking initialized sections such as .text to external RAM (or internal RAM for that matter) is only going to work provided CCS is connected up. It will not work in a standalone system (no CCS). In a standalone system, all initialized section need to be linked to non-volatile memory, and then some can be copied to RAM if desired for faster access at runtime.

    Hope this helps.

    Regards,
    David
  • David

    thank you, I learn much.

    If I want to write data to external ram or read data from external ram in my programm through XINTF,I also need not to control XZCS7n and XWE0 signals,isn't it ?

    Zhang
  • zhang yuheng said:
    David
    If I want to write data to external ram or read data from external ram in my programm through XINTF,I also need not to control XZCS7n and XWE0 signals,isn't it ?

    That is correct.  The XINTF module controls all the signal pins.  If the address is mapped to external memory, the hardware hands the access request off to the XINTF and it does the rest.

    Regards,

    David

  • David:

    I try to run the Example_2833xCodeRunFromXintf on my board. Becouse I map the external ram to zone7,so the cmd file in the example is modified as below

     

    MEMORY

    {

    PAGE 0 :

    ...

    ZONE7A : origin = 0x200000, length = 0x040000 /* XINTF zone 7 - program space */

    ...

     

    PAGE 1 :

    ...

    ZONE7B : origin = 0x240000, length = 0x040000 /* XINTF zone 7 - data space */

    }

     

    SECTIONS

    {

    ...

     

       xintffuncs       : LOAD = RAML1,

                        RUN = ZONE7A,

                         LOAD_START(_XintffuncsLoadStart),

                         LOAD_END(_XintffuncsLoadEnd),

                         RUN_START(_XintffuncsRunStart),

                         PAGE = 0

      

       ...

       ZONE7DATA       : > ZONE7B,  PAGE = 1

    ...

    }

     

    I comment the two lines in the Example_2833xCodeRunFromXintf.c

    //#pragma CODE_SECTION(cpu_timer0_isr,"xintffuncs");

    //#pragma CODE_SECTION(cpu_timer1_isr,"xintffuncs");

     

    I know the two functions will be loaded to the internal ram, and will run in the internal ram. Now the programm runs correctlly.

     

    But when I uncomment the two lines, it runs to the ILLEGAL_ISR().

     

    when i open the memory watch window, the programm at 0x200000 show as below

     

     

    the data are all FFFF, and the data can not be modified.

     

    Is there some mistakes or the external ram is damaged? How can i check wether the ram is damaged?

     

     

    Regard,

    Zhang

  • Zhang,

    Forget about the code for now, and focus on CCS and the external memory. You have your CCS target configuration setup for F28335, right? It will use the GEL file F28335.gel located here: C:\TI\ccsv6\ccs_base\emulation\gel. Did you uncomment the call to XINTF_Enable() in the OnReset() function in the .gel file?

    I uncommented the XINTF_Enable() and saved the .gel file. I then started CCS and connected up to my eZdspF28335 development board. This board has external SRAM in Zone7. After connecting to the target in CCS, I can view/change the contents of the external SRAM in a memory window at address 0x20_0000. You should be able to do this too, or something is wrong. The board connections should be debugged. You can start by checking XZCS7n strobe with a scope when an access is made. Do you see it pulse? Check at the SRAM.

    Regards,
    David
  • David,

         When I change the contents of the external SRAM in the memory window, Is it a access?

    Zhang

  • zhang yuheng said:

    When I change the contents of the external SRAM in the memory window, Is it a access?

    Yes, that will cause a write to the SRAM.

    - David

  • David

           There must be some mistake on my board, and I can not debug it in a short time. I change another board which connect the ext ram to zone6. The board is reliable and the 'xintf_run_from' and other examples  run correctly on it. Because my programm is too big, I want to run some functions in the ext ram,but  I can't load the .out file to the ext ram, and it shows

     

    I don't konw where are the mistakes, please help me. My programm and the schematic diagram can be find in the attachment. Thank you.

    Regards.

    Zhang

    DSP_INS_1.0.zip

    DSP28335_CORE原理图.pdf

  • Zhang,

    Check your F28335.gel file (in CCS) to see that it is enabling the XINTF zone6.  CCS cannot load code into the XINTF unless the XINTF is enabled.  In the function OnReset(), you need the XINTF_Enable() GEL function UNCOMMENTED.

    OnReset(int nErrorCode)
    {
        if (GEL_IsInRealtimeMode())   /* If in real-time-mode */
        {
        }
        else    /* Put device in C28x mode */
        {
             C28x_Mode();
        }
        Unlock_CSM();
        ADC_Cal();
        XINTF_Enable();               /* Uncomment to enable XINTF on Reset */   
    }

    Regards,

    David

  • David

      I  checked my gel file,  the XINTF_Enable() GEL function is UNCOMMENTED.

      I  replace the OnReset() function with your code, but it also shows the error information I said.

    the console window shows that

    XINTF x16 enabled by GELC28xx: File Loader: Data verification failed at address 0x00104FFD Please verify target memory and memory map.
    Error found during data verification.
    Ensure the linker command file matches the memory map.

    Regards.

    Zhang

  • Zhang,

    It appears that your XINTF is not getting initialized correctly. Forget about loading code. If initialized correctly by CCS, you should be able to open a memory window to an external memory location, and then change the value in CCS. If you refresh the memory window, you should see the external memory signals activate (e.g., CSn go active, address lines driven, etec.).

    - David