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.

How to use EDMA McBSP Device Driver for TMS320C6x1x DSPs

 

Hi,

I am trying to use the above generic driver from DDK for my 6416T DSK board.

The intention is to use it to communicate with a device using SPI (8bit).

I have 'sort of' configured McBSP0 and also the OPT of EDMA into a dev_param file.

I understand that the DSP/BIOS's I/O device driver will need to be configured.

The document for the above driver, spra846A, gave explanation about the driver.

However, what is missing is how to use it ... example code will be very useful.

Questions like how do I even open or launch it.  How do I pass data (or buffer address) for transfers?

I have looked through the uarttest example where there are Create and other instructions.

How do I write a .c file to use this generic EDMA McBSP driver?  Is there a command list?

Appreciate if you could provide example code or advice steps or direct me to a location for help.

Thank you.

Regards,

J L   

 

  • Hi J L,

    What you need is spra633c application note that comes with an excellent *.c example of how to initialise and execute uart comms using McBSP. That was the eye opener for me at the time and I am sure it will answer most of your questions on this topic.

    Good luck,

    Cryptoman

  • Hi Cryptoman,

    Thank you for your kind reply.

    I have read through spra633c before.  It explained about using the uart.  However, mine is SPI communication. 

    I forget to mention that I have actually used SPI and EDMA successfully using the lowest level of programming with register settings instead of using CSL.

    However, I wish to interface this with Matlab which needs drivers.  Therefore I thought of using the Generic Device Driver from DDK1.2 (spra846a).

    After posting for help last week, I discovered that I need to use Class Drivers in the application layer to use this mini driver.

    I have written a program using GIO_create to use the driver.
    Unfortunately, the GIO_create command returned a null handle with an error code -10.  The error means illegal arguments.

    I am now trying to debug this error.  Appreciate if anyone can help me on this.

    The McBSP settings in the dev_parameter file is based on the working program that I did for the SPI. 

    Do I need to include settings for the EDMA?  What could be the illegal argument? 

    Do I need to provide Channel parameter when using with GIO ?

    Appreciate your help.  Thank you.

    Regards,

    J L