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.

EVMDM6437 McBSP loopback

Hi,

I have EVM for DM6437. 

I am looking for example code for McBSP or SPI in loopback. 

Is It possible to test McBSP loopback code on EVM??

Early answer is highly appreciable.

I am new in TI DSP so need example code to understand the programming of PORT and programmin of DSP.

Regards,

Naresh

 

  • Hi Naresh,

    Thanks for your post.

    You couldn't get direct McBSP loopback example on DM6437 EVM, instead you have to write code using CSL API's for McBSP module to configure registers & setup McBSP initialization. Also, you could download the DSP/BIOS DVSDK v1.11 which supports DM6437 with combined PSP driver package. You could use CSL libraries to run examples independantly even with out DSP/BIOS interface. You could download the DSP/BIOS DVSDK from the below:

    http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/dvsdk/bios_dvsdk/1_11_00_00/index_external.html

    http://processors.wiki.ti.com/index.php/DVSDK

    From the above, PSP comes as part of DVSDK which  includes DSP/BIOS drivers, examples and documentation.

    You also have option to download MontaVista Linux based DVSDKs too from the below:

    http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/dvsdk/mv_dvsdk/index.html

    For using a PSP driver in DSP/BIOS environment, please refer the below wiki:

    http://processors.wiki.ti.com/index.php/Using_a_PSP_Driver_in_DSP/BIOS#Advanced:_Beyond_PSP

    From the above wiki, the McBSP driver included with the DM6437 PSP is intended solely for audio applications and full source code for all drivers is included with the PSP. So, to develop your own application, only PSP driver will not be suited, you should think of two options which are below:

    1. Write a low-level program using register-layer CSL (RCSL)

    2. Modify the PSP driver

    In option 1, you could use register CSL (rCSL) macros and function CSL (FCSL) which are library API C functions to develop your own example applications. You could download the CSL for DM64xx as below:

    http://www.ti.com/tool/sprc090

    You could also download the CSL API reference guide, in which you can refer Chapter 16 for McBSP module CSL API functions and macros as below:

    http://www.ti.com/lit/ug/spru401j/spru401j.pdf

    Additionally, you could see the below DSP/BIOS workshop material to understand "how channel sorting works" which would give your more understanding on McBSP EDMA event sync.

    http://processors.wiki.ti.com/images/5/5e/EDMA3_LLD.pdf (page no's 38 - 43)

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------
  • Hi Shivraj,

    Thank you very much for your detailed answer. 

    I will go through all the docs and code and get back to you. 

    Regards,

    Naresh

  • Hi Shivraj,

    I  have  successfully modify GPIO code for loopback code of McBSP with rCSL without bios. Thank you for your direction(option 1).

    Now I have to do loopback for SPI on DM6437 EVM. 

    Loop back mode for SPI is not possible with McBSP. There are two McBSP on DM6437. Can I configure one McBSP0 as SPI master and other McBSP1 as SPI slave and do general loopback (one will transmit and other will receive)?

    If yes, what and how needs to be change on DM6437 EVM board. I mean any extra connection between pins. 

    if not, then how can I test the SPI on DM6437 EVM?

    (the idea is DSP will communicate with other microcontroller in my project and the board is not ready yet. Before board is ready, I need to be ready with communication code. )

    Best regards,

    Naresh

    I have attached the code for someone's reference.

    2260.GPIO.zip

     

     

  • Hi Naresh,

    Yes, you can configure McBSP0 as SPI master and other McBSP1 as SPI slave and perform general loopback.

    I don't think, it would require extra connections across pins.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------
  • Hi Shivraj,

    I have implemented the general loopback code for McBSP with polling. 

    Can you please guide me how to replace the polling with interrupt in rCSL code (for McBSP or other general example code)?

    Please share some example code  of rCSL in that interrupt is implemented.

    P. S. I need example code as I am new in TI DSP programming.  

    Thank you,

    Naresh