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.

DSP sample project

Other Parts Discussed in Thread: OMAP-L138

Hi

I am new to OMAP-L138 processor,  Please provide me a sample code in which I can use the shared memory between ARM and DSP to set or read a variable running in ARM core from the DSP core and vice versa. Also suggest readings if any.

I downloaded the helloDSP program and find it very overwhelming, unable to find the correct documentation for it.

Thanks & Regards

Deepak

  • Hi Deepak,

    I am currently unaware of any existing examples available for OMAP-L138 that use the shared memory to set/read variables between the ARM and DSP cores. However, there will be such an example available in the second version of quickStartOMAPL1x_rCSL located here: http://processors.wiki.ti.com/index.php/QuickStartOMAPL1x_rCSL.

    While there is no set date, a second version should be available in the near future (few weeks).

    One such implementation is to set aside part of the shared memory where you might want to create shared variables. Then, create unique pointers in your source code for the ARM and DSP core that point to the same memory location. These pointers can then be used to set/read a shared value.

    For example, you might create a header file as such:

    #define sharedVarsMem 0x80010000

    typedef struct{
         volatile int var1;
         volatile int var2;
    } sharedVars;

    typedef volatile sharedVars *sharedVarsPtr;

    Then in your ARM and DSP source code, you can create unique pointers that point to the same location:

    sharedVarsPtr armPtr = (sharedVarsPtr)(sharedVarsMem); // Place in ARM code
    sharedVarsPtr dspPtr = (sharedVarsPtr)(sharedVarsMem); // Place in DSP code

    You can the use the pointers to access the variables:

    armPtr->var1 = 5; //Place in ARM code
    dspPtr->var2 = 10; //Place in DSP code

    As for documentation, the OMAP-L138 system reference guide and data sheet may be good starting places.
    OMAP-L138 System Reference Guide: http://www.ti.com/lit/pdf/sprugm7
    OMAP-L138 Data Sheet: http://www.ti.com/lit/pdf/sprs586

    Hope this helps!

    -Kevin

  • Hi Kevin

    That is what I am looking for.

    Thanks & Regards,

    Deepak