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.

C6747 PSP McASP without EDMA3

Other Parts Discussed in Thread: ADS1278

I have been writing example programs on the C6747 EVM.  I have a program that tests McASP1 that uses EDMA3 to facilitate the data transfers.  Now I would like to remove EDMA3 support and see how much the CPU load increases when DMA is not used.  The PSP User guide states:

Defines “-DMcasp_EDMA_ENABLE” to enable EDMA3 support in Mcasp driver.  It is also mentioned in the file McASP.h

But I don't see anywhere in the source code that this #define exists.  Am I missing something?  It seems like the driver will include EDMA support regardless of this being defined or not.  How can I build the McASP library so I do not use EDMA3 drivers and the huge code overhead that comes with it?

sincerely,

Mike

 

  • Hi Mike,

    This is part of the build options at the driver's project:

    C:\Program Files\Texas Instruments\pspdrivers_01_20_00\packages\ti\pspiom\mcasp\build\C6747\mcasp.pjt

     

     But this is not implemented indeed, otherwise you would have in the driver source code some thing like:

    #ifdef Mcasp_EDMA_ENABLE

    What you could do in the McASP driver, is change the source code to make it work. You could put an ifdef at lines 513 and 556 of the file:

    C:\Program Files\Texas Instruments\pspdrivers_01_20_00\packages\ti\pspiom\mcasp\src\Mcasp.c

    And of course adapt you application.

     

  • Hi Mariana,

    I tried this and am still having some issues.  It may be in the way I'm assigning interrupts.  The interrupt event I need to use = 61 (MCASP_XR_EVNT).  How do I set this up correctly?  It seems the driver code is only set up to use the EDMA3 Event interrupt.

    Also, it seems the field "isDmaDriven" serves no purpose in the driver because it's always hard-coded to TRUE.  When I declare a global variable in my program of type Mcasp_Chanparams, I set the field "isDmaDriven" to FALSE.  But it looks like the driver code will force this to TRUE.  The program crashed when I tried to run it by setting this field to FALSE in my application code.  Was this an oversight in the driver development?

    Mike

  • Hi Mike,

    Sorry for the delayed response.

    The C6747 Mcasp driver supports only EDMA mode of operation.The interrupt mode of operation is not supported by this driver.
    sorry for the confusion caused by the "Mcasp_EDMA_ENABLE" macro and the "isDmaDriven" field . These will be removed in the next release.

    thanks & regards,
    imtiaz

  • Thanks for the clarification.  When is the next planned release of PSP for C6747?  Will the McASP driver ever have the option of being used without EDMA?

    Mike

  • Hi Mike,

    Per Imtiaz answer, it will not be supported. The references to it will be removed so there will be no confusion.

    Anyway, it is much better to make use of EDMA, that is why probably the option without EDMA was not implemented.

  • Hi Mike,

    I'm interested in this exemple using McASP and EDMA3 on the C6747. Where could I find it?

    Thanks in advance,

    Gaston

  • I'm working on the same issue, and I'd like to know if you are using the McASP in burst mode or it is running without interruption (tdm od dit).

    In burst mode, I'm only able to send the first buffer of data, when the dma is set for the second time, the transmission doesn't start...

  • Hi Miriano,

    I'm planning to use McASP in TDM mode without EDMA interruption (isr) but I have not yet started working on it. I'll let you know if there is anything new.

    Regards,

    Gaston

  • Gaston,

    Are you still interested in my example that runs on the EVM?  It uses McASP1.  It runs in TDM mode (NOT burst mode) and uses EDMA since it is the only mode supported by the PSP.

    I need to zip it and the I can post it as an attachment, I think.  I'll try and do it by the end of this week if you're still interested.

     

    Mike

  • Mike, I would appreciatte your help. I'm interesting to perform TDM transfers between C6747 McASP+EDMA and ADS1278 analog to digital converter. If you can post your example as an attachement after this weekend it would be perfect for me because I'm starting to produce an Audio Expansion interface connector for EVM.

    Gaston

  • I believe I have all the needed files zipped into the attachment.  This program assumes you have PSP release 01.20 and EDMA release 01.06.00.01.  I haven't tested on other releases.  I have only compiled in Debug configuration but others should work.  You will probably get an error when the project loads that it can't find a *cfg.cmd file.  That's fine. Ignore it and it will get generated when you first build the project.  Like you said, you will need an Audio expansion connector for the EVM. I had a SAMTEC cable connected to P11 of the EVM and ran this to a test board that had all the pins broke out as headers so I could easily probe pins with a scope and jumper pins together when needed.  You'll also need to by-pass the default connections of McASP1 Tx so they get routed to P11.  This is done with pin 74, I think.  You need to change the default logic level so the McASP1 signals are routed to P11.  Look at the EVM schematic and see where "EXP1_SEL_MCASP1" signals are routed.

    I can't give up a lot of time to support this program but i can try and help you at least get it running.

     

    Mike

    mcasp_test2.zip
  • Mike, thank you for replying and attach your example. I use PSP 01.30 and EDMA release 01.10.00.01 It seems that there two different function declarations in edma3_common.h that prevents successful compilation.

    extern void edma3OsProtectEntry (unsigned int edma3InstanceId,
                                            int level,
                                            unsigned int *intState);

    extern void edma3OsProtectExit (unsigned int edma3InstanceId,
                                            int level,
                                            unsigned int intState);

    I would need to dig a little deeper on this but I'll try to do it. Well, at the moment I only need McASP Rx ports because I need to control ADS1278 AD converter so I have to take a look to P11 as you say.

    Gaston

  • Please take a look in the edma3_driver_user_guide.pdf that should be in your drv/docs folder. Do a search for edma3OsProtectEntry and you should find some information on what you are supposed to do to implement these functions - they are OS-dependent so the user has to supply them.

    There ought to be an example or two in the examples folder, though. Look for bios_edma3_drv_sample_cs.c. My LLD folder is older than yours so you will want to find the right one for your release.