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.

Initializing SDRAM

What do I need to do with the GEL file to get my SDRAM to work?  I  have a function called Setup_EMIFB() within the OnTargetConnect() function, but I still cannot even change the memory manually.  I have the SDRAM set up in the .tcf file.   Is there something else that needs to be done? Once the program loads (before it gets to main() will the SDRAM be initialized at this point?  I have a c6745 using XDS100V2 emulator and CCS4.2.

     thanks,  jamp

  • Jamp,

    I don't believe that your SDRAM will automatically be enabled at main().  I believe Bios gets started after main.  What GEL file are you using?  Is it one associated with the c6475?  You'll have to look at the Setup_EMIFB() function in your GEL file and compare it with the requirements of your target device for initializing the SDRAM. 

     

    Regards,

    Dan

     

  • I found a file called evmc6747_dsp.gel in my evmc6747 folder below the ccsv4 folder.  I tried it and the SDRAM works now -- even at c_init() before it gets to main().  However, my main problem is that I am not able to get to main().  I thought it might be because the SDRAM might not be initialized, but now that I can see that it can change and it still never gets to main() after I try to run it to main.

        jamp

  • Ok, so if you're able to read and write to SDRAM now, that's probably not the issue.  It must be initialized in the OnTargetConnect function in the GEL file that you are now using.   What memory is your .cinit section linked into?  Is it in SDRAM or is it in some other memory?  When you try to run to main, and then halt, where is your PC?  Is it off in uninitialized memory?  Or is it in some function in the .cinit section?  You could try linking .cinit to some other portion of memory.  You might also try stepping through the cinit code to see if it runs off into the weeds somewhere (It will take a while, a lot of stuff goes on in cinit. 

    Regards,

    Dan

     

  • I have stepped through literally hundreds of steps and everything seems fine, but it goes back to memcpy a lot. I suppose it's setting up variables. When I try to run it just hangs.When I pause at this point it is in C$L1 whatever that is.  It is moving register contents from one register to another and keeps doing it over and over and never gets out of this loop.  One of the commands is SPKERNEL.

         jamp

  • .cinit is in IRAM.