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.

L138 GEL files

I'm using a logicPD L138 eXperimenter board with CCS v3.3.

I've had trouble running a program and then reloading and running it again. The program
will (sometimes) run once (the first time) but will not run properly subsequently. I'm using edma to
access the aic3106 codec via mcasp. When I say that the program will not run properly, a second time, I

think that the problem is that I'm not getting/handling edma transfer completion interrupts. The program doesn't

crash but it's not communicating with the aic3106. Sometimes a Debug->Advanced Resets->System Reset, followed by
GEL->Experimenter->All_On_Experimenter will lead to a situation in which the reloaded  program will run correctly.

But then I tried using evmc6747_dsp.gel supplied with the OMAPL137 EVM instead of c6748.gel supplied with the eXperimenter and started to have
more luck.

So what's the difference between c6748.gel and evmc6747_dsp.gel?

I started to have a look and apart from differences that are obviously related to the differences
between the two devices (L137 and L138), e.g. L138 has single MCASP,
I noticed some differences that I don't understand.

Why does c6748.gel not have a function OnPreFileLoaded()?

This seems to be key to my original
problem. Using evmc6747_dsp.gel I get a GEL_Reset() and a Disable_EDMA() when reloading my
program and that seems to allow the program to run a second time.

But then, what's this: when I reload my program, Disable_EDMA() is apparently being called from
OnRestart(), not from OnPreFileLoaded(). The comments for the OnRestart() function in evmc6747_dsp.gel are confusing to me.
"This is different then(sic) OnPreFileLoaded() which will do a GEL_Reset()." But how is
File->Reload Program invoking OnRestart()?

Why does c6748.gel not have a function OnRestart()?

Why does c6748.gel not have a function StartUp()?

I've been looking at SPRAA74A "Creating
Device Initialization GEL Files" and evmc6747_dsp.gel appears to follow the pattern given
there in providing functions such as OnPreFileLoaded() and StartUp().

Does any of this make any sense? I'm hacking evmc6747_dsp.gel so that I have a version that
is a little more like c6748.gel with respect to L137/L138 differences, but am I looking in
the right place to solve my original problem?

Ultimately, if I am understanding things correctly, any initialisation that is not performed by the GEL files in CCS must/should be carried out

in the program itself. But as things stand, I'm better served by evmc6747_dsp.gel than by c6748.gel. Is there a reason why c6748.gel is

apparently so much more limited than evmc6747_dsp.gel?

 

  • You are looking at the right app note for an explanation of those GEL functions and how they are invoked.

    I think what is happening here is that the McASP continues to run while you reload/start/stop your program.  In your code, you likely don't reset the McASP or EDMA, therefore you end up re-programming them while they are running. 

    It looks like the C6747 GEL file takes care of at least disabling the EDMA for you and this may be what is alleviating your issue.  I agree we should have similar functions on the C6748 GEL file, not sure why we don't, I'll have to check with LogicPD about this.

    You could add psc_disable() functions to your code to disable/reset the EDMA and McASP every time you re-run your program or you could try copy what the C6747 GEL file is doing.  I think the first option is more robust.