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.

Sending TDM Audio Data via McASP

Other Parts Discussed in Thread: PCM4104, TMS320C6713B

Hello,

I'm using the TMS320C6713 DSK and I am interested in sending an 8-channel stream of audio via the McASP to a PCM4104 (DAC) EVM module and I am programming using the Code Composer Studio.

I have read the McASP datasheet regarding how to configure the registers for McASP / TDM transfers, however, my main concern is that I cannot find any examples / sample C code on how to actually allow the handshake to happen and the audio data stream to transmit to the DAC EVM.

Additionally, I am confused on if I will use J3 or J4 (HPI) for the wiring.

Any comments or help is highly appreciated,

Thanks

  • Alex,

    Go to the Wiki and search for "c6713 training" (no quotes). I think the workshop material actually has C6x1x in the title, but it makes better sense to find relevant material using c6713. You can pull down the student guide to walk through to help you learn some of the programming techniques, and there are labs that can help you with some programming. There will not likely be an example that already does what you want, but there is information to teach you the basics.

    What version of CCS are you using?

    Do you have all of the board-related software that comes with your DSK? If not, you can get it from the vendor's website.

    Why are you confused on using J3 or J4? What do you think would be best for getting access to the McASP signals? Do you have the DSK documentation from the vendor?

    Have you successfully run and modified any of the McBSP examples that come with the DSK?

    It seems like there was a Driver Development Kit (DDK) that we had for the C6713 several years ago. You may want to do some searching for that, at TI.com or the internet.

    Regards,
    RandyP

  • Randy, Thanks for the reply. I will look up those examples on the TI wiki. To answer your questions --

    I am using CCS version 3.1, my university has not upgraded to CCS4 or CCS4. 

    Using the vendor datasheet, I am almost certain that the HPI (J4) will be the ones that I will use, but I have't yet confirmed the McASP signals are configured to be sent to those ports. 

    As far as I know, there is not a McBSP example in the DSK examples. Most of the work I did as a student with this board was using the input and output that is provided via the AIC32 ADC and DAC onboard. Since, I am using 8-channels, I am forced to use my own pins.  

    Also, I do not have a daughter card for the DSK either to connect it. I am using small wires to connect to the J4 port. 

  • Alex,

    It has been a while since I used a C6713 DSK, but my recollection was that the AIC (32?) was driven by the McBSP. If so, then any AIC32 examples would be using the McBSP which is similar in many ways to the McASP.

    I am confused how you could be using small wires to connect to the J4 port if you have not confirmed the McASP signals are found there.

    Regards,
    RandyP

  • I will look into those examples to check. I am also working my way through the student guide to the c6713 training. 

    What I meant with the wires, is that I plan to use them to connect to the J4 port. Do you know what I should be looking for on the datasheet to figure out where the McASP signals are going? I have been a little confused switching between the DSK datasheet and the McASP one. 

  • C6713 datasheet - TI's legal description of the device, internal architecture, terminal pin names and functions, and electrical characteristics

    McASP User's Guide or Reference Guide - Specific information and extra detail about the nature and use of the peripheral

    C6713 DSK Technical Reference or TechRef - Provided by board vendor to describe the contents of the board and appropriate information on physical properties, connections, and settings

    C6713 DSK Schematic - Wiring information describing the DSK board as a network of signals and components

  • Randy,

    Thanks for the documentation links. I now have a correct understanding of the appropriate pins to use. However now I am once stuck again..

    I downloaded the Chip Support Library for Code Composer and using the C6000 DSP. I am running the "mcasp" example that it comes with in its example folder. I want to see the clock on an oscilloscope to ensure it's functioning, however, when I run the program for McASP test, the program says "TEST PASSED" However, my oscilloscope is showing no movement what so ever (triggered and non-triggered). 

    Before connecting the DSP to my DAC EVM, I would like to know the clock is function correctly. How may I test for this? 

    Code Composer 3.1 with TMS320C6713 DSK. 

    Thanks

  • Alex,

    How are you attempting to observe the McASP clock?

    What does the documentation or the code comments for the McASP example say about whether it should appear at the pins or if pins are enabled for external viewing?

    Regards,
    RandyP

  • Randy,

    I am attempting to view the clock using an oscilloscope connected to the AHCLKX pin via a wire. I assume that when the McASP begins a transfer and receive that the clock is activated for external viewing. 

    If it is not available for external viewing, how can I make that happen? I am interested in having the clock, frame sync, and data sent to the PCM4104 DAC EVM module. It will send 8 audio channels via one data wire.

  • Alex,

    I am not sure how precise you are being with "using an oscilloscope connected to the AHCLKX pin via a wire". Looking at the pin would usually mean touching the DSP's pin with the scope probe, so there may be some detail missing.

    The TechRef and schematic are what you need to follow to determine how to connect and where to observe the signals. My guess is you are not looking at the right place, or else the test would not have said it passed.

    Regards,
    RandyP

  • Randy, I have attached a wire to J1 PIN 13 which is referenced as "HD5/AHCLKX1 I/O"  and I have attached the probe of the oscilloscope to the pin, and the ground of the oscilloscope to a via that is connected to J1 PIN 7 which is "GND",

    Therefore, I expect to see the high-frequency clock from that pin. However, I see nothing but a 3.3V DC voltage. 

  • Alex,

    Do you see any signals on any of the other McASP1 lines on J1?

    Does the McASP test program that you are running use McASP1 or McASP0?

    Does the test use an internal loopback for testing purposes, sometimes called Digital LoopBack?

    Regards,
    RandyP

  • Randy,

    I only see 3.3V on other points I have tested on the J1 connector, some zero (which were GND).

    The McASP test program I am running declares port = 0, then states McASP(port) so I would say McASP0 is being initialized.

    The McASP program does not have any comments or code regarding digital loopback, however, the McBSP code does contain code and comments regarding the use of digital loopback.

    I can attach the code, however, there are multiple .c files (main, peripheral, and interrupt files), and a header file.

  • Alex,

    To be honest, I would not be able to help you any more with the code than I can by trying to point to where to look. I do not have a DSK6713, but it is always possible someone who does have one would be monitoring this thread and can help.

    I have some very old CSL copies from 2006 that have dsk6713 CSL. I only see mcasp1 filenames.

    Which example are you using?

    Regards,
    RandyP

  • I actually believe I have those same examples. I am running the example called 'mcasp1' and the folder also contains a mcbsp, and edma example also. The mcasp1 is the example that says 'test passed' when I run it. 

    Another question, I have recently checked for availability of targeting the DSK with CCS5.3 and Simulink but I am unsure if there is McASP support for this method? Also, would the legacy device be compatible with the newer version of CCS5.3? 

  • Alex,

    If you put a breakpoint in the code at the call to SetupSrcLocations, do you see the source data copied to the destination buffer?

    Would your scope catch a burst of activity on the lines that then ends?

    Have you traced the signals on the schematic to see which pins on J1 they connect to?

    Have you looked at the datasheet to see which signals will be toggling when McASP0 is operating?

    Regards,
    RandyP

  • On the datasheet I can go to the McASP/HPI Sheet (Page 41 of the DSK datasheet) and look at the AHCLKX1/HD5, and trace that to the HPI Diagram to show that Pin 13 on J1 should be the transmit clock. But, I do not see a differentiator between McASP0 and McASP1 in the schematic. How can I tell? 

    On the oscilloscope, it can go down to 4 nano seconds on the horizontal axis, and I have tried both triggered and non-triggered modes. I would assume 4 nano seconds should be sufficient to view the clock, frame sync signals, and definitely the data signals.

    If you are able to see that example, do you think that I should start from this example or from scratch on doing what I am trying to accomplish? All I need is the master clock, frame sync, and 8 channels of TDM data to transmit, no receive is necessary. Theoretically it sounds straight forward. But I have yet to find a straight forward solution in setting up the McASP and beginning the transmission in my c code.  

  • Alex,

    You definitely want to start from a working example.

    The DSK does not have a datasheet, as far as I know of. It has a Technical Reference and a Schematic, and some other various docs. The C6713B datasheet is the legal description of the TMS320C6713B device as it will be sold by TI. At TI, at least, when we say datasheet, that has a special meaning. We also have Application Reports or Application Notes, and User Guides and Reference Guides. Just FYI so you know what I mean by the terms I use.

    Alex Kidd said:
    I do not see a differentiator between McASP0 and McASP1 in the schematic. How can I tell?

    In the C6713B datasheet (I have rev B, sprs294b), what differences do you see between the signal names in the Figures 5 on pages 30 & 31?

    I do appreciate your patience. This may be close to being solved.

    Regards,
    RandyP

  • Okay, so cross-referencing the documentation from the TMS320C6713B datasheet and the signal chart from the Spectrum Digital document, it appears that the same HD5 signal it the same HD5/AHCLKX1 on the TMS320C6713B datasheet is driven from McASP1.

    Now that I know it is McASP1, what would be my next step?

  • Randy,

    I last posted on April 4, I was wondering if you saw my previous post?

    Thanks,

    Alex

  • Alex,

    It is not totally clear what to suggest to you to do next. Let me see if I have the current status correct:

    - you have a test that you wrote, somewhat started from another example, and it does not seem to work right
    - your test uses McBSP0
    - the observation that it is not working right is that you do not see the HD5/AHCLKX1 pin toggling
    - you have cross-referenced the datasheet and signal chart and found that the pin you looked at with the scope is driven by McASP1

    If I have that right, then some thoughts are

    1. Find a working example, unmodified, and get that to work.
    2. Determine which pin(s) should be observed. Please let us know what you see on that pin.
    3. Do your observations after reviewing the schematic and TechRef to determine the best spot to place your scope probe.

    Regards,
    RandyP

  • We did not write a test, we are using the "mcasp1" test that is included in the CSL C6000 Library. 

    We have attempted to observe the AHCLKX1 and the frame sync, and transmit data for the McASP1, with no luck. 

    I have cross-referenced the datasheets sheets and did confirm that McASP1 is correct for this example program. 

    So, observing this test program, I have not seen any signal other than noise on any of the pins (I checked MsASP0 as well, just to be sure). 

  • Alex,

    I thought we determined that "port = 0" meant the test was using McASP0, in spite of the poorly chosen title of "mcasp1". Is that correct?

    When you checked McASP0, where on the schematic did you put the scope probe? What logic or devices are between that point and the DSP chip?

    Looking at the test code, does it run the McASP port and then shut it down, or does it leave the clocks and data running after the test has completed?

    Regards,
    RandyP