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.

Debugging using the eZdsp external memory

Some of you may remember I had problem linking my project using the default linker command file (i.e. putting all program code into internal memory).  As suggested, I modified my configuration to put sections of my code in external ram (non time critical function).

Since then, once in a while, when executing my program in debug mode, it would crash at a random address.

I finally found out why and found a fix.

In my project, I try to re-use as much as possible the code examples provided from TI, especially code to reset and configure the DSC initial state.  So, when my program is started, I use the function InitGpio (located in DSP2833x_Gpio.c file of TI examples) to initialize all GPIOs to a known state.  But since this function resets all GPIOs, it will unconfigure the external RAM (in which part of my code is executed).  So, right after calling InitGpio, I reconfigure the external ram.

Now, while the external ram is unconfigured and my program execute, it seems that data is written at random locations.  I figured this happens because the external ram chip select (GPIO37 on the eZdsp) pin is set to low (active) by the InitGpio function call (causing all write operations on the data bus to be executed in the external ram, thus corrupting the loaded program).

What I did to avoid this is simply modify the InitGpio function to keep GPIO37 high and everything works fine in debug from now on.

Hope this trick will help somebody else...