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.

Using off-board mcBSP on C6713 DSK

I have a C6713 DSK board with a blank prototyping daughter board. I have it configured so that both of the serial channel bits in the CPLD register are 1 (off-board).

I am using the example code provided for writing to the mcBSP port using digital loopback mode, with modifications to set the CPLD register. I also have it printing out the DC_DET bit so I know it is recognizing the presence of the daughter card. It is a blank prototyping card that I haven't built anything on yet.

I want to read the transmit data from pin 36 (transmit data on the peripheral expansion connector), but I am not seeing anything coming out when I write to the serial port. The value remains a flat 3.16 V. The digital loopback code appears to be running correctly, however, because I put a printf in there when it write to the serial port. I'm just not seeing anything on the pin.

Is there something with using digital loopback mode or something else I need to do to make the data appear at the daughter card pin. I can see the clock signal on pin 33 ok.

 

 

 

  • Hi Theresa,

    Digital Loopback implies that the signals are looped back from inside the module itself - these signals will not make it out to any external pins. DLB is very much a self-contained, internal process. If you wish to see the data output on the McBSP pins you will need to configure the serial port to operate in something other than DLB mode.

    Aside from this it sounds like you have taken the other necessary steps to read the headers (including DC_DET and re-configuring the McBSP mux).

  • Okay, I switched to a different configuration for the mcBSP channel, but I'm still not seeing anything on the output pins.

    Here's the configuration I am using:

    static MCBSP_Config mcbspCfg1 = {
            MCBSP_FMKS(SPCR, FREE, NO)              |
            MCBSP_FMKS(SPCR, SOFT, NO)              |
            MCBSP_FMKS(SPCR, FRST, YES)             |
            MCBSP_FMKS(SPCR, GRST, YES)             |
            MCBSP_FMKS(SPCR, XINTM, XRDY)           |
            MCBSP_FMKS(SPCR, XSYNCERR, NO)          |
            MCBSP_FMKS(SPCR, XRST, YES)             |
            MCBSP_FMKS(SPCR, DLB, OFF)              |
            MCBSP_FMKS(SPCR, RJUST, RZF)            |
            MCBSP_FMKS(SPCR, CLKSTP, DISABLE)       |
            MCBSP_FMKS(SPCR, DXENA, OFF)            |
            MCBSP_FMKS(SPCR, RINTM, RRDY)           |
            MCBSP_FMKS(SPCR, RSYNCERR, NO)          |
            MCBSP_FMKS(SPCR, RRST, YES),

            MCBSP_FMKS(RCR, RPHASE, SINGLE)         |
            MCBSP_FMKS(RCR, RFRLEN2, DEFAULT)       |
            MCBSP_FMKS(RCR, RWDLEN2, DEFAULT)       |
            MCBSP_FMKS(RCR, RCOMPAND, MSB)          |
            MCBSP_FMKS(RCR, RFIG, NO)               |
            MCBSP_FMKS(RCR, RDATDLY, 0BIT)          |
            MCBSP_FMKS(RCR, RFRLEN1, OF(1))         |
            MCBSP_FMKS(RCR, RWDLEN1, 16BIT)         |
            MCBSP_FMKS(RCR, RWDREVRS, DISABLE),

            MCBSP_FMKS(XCR, XPHASE, SINGLE)         |
            MCBSP_FMKS(XCR, XFRLEN2, DEFAULT)       |
            MCBSP_FMKS(XCR, XWDLEN2, DEFAULT)       |
            MCBSP_FMKS(XCR, XCOMPAND, MSB)          |
            MCBSP_FMKS(XCR, XFIG, NO)               |
            MCBSP_FMKS(XCR, XDATDLY, 0BIT)          |
            MCBSP_FMKS(XCR, XFRLEN1, OF(1))         |
            MCBSP_FMKS(XCR, XWDLEN1, 16BIT)         |
            MCBSP_FMKS(XCR, XWDREVRS, DISABLE),

            MCBSP_FMKS(SRGR, GSYNC, DEFAULT)        |
            MCBSP_FMKS(SRGR, CLKSP, DEFAULT)        |
            MCBSP_FMKS(SRGR, CLKSM, DEFAULT)        |
            MCBSP_FMKS(SRGR, FSGM, DEFAULT)         |
            MCBSP_FMKS(SRGR, FPER, DEFAULT)         |
            MCBSP_FMKS(SRGR, FWID, DEFAULT)         |
            MCBSP_FMKS(SRGR, CLKGDV, DEFAULT),

            MCBSP_MCR_DEFAULT,
            MCBSP_RCER_DEFAULT,
            MCBSP_XCER_DEFAULT,

            MCBSP_FMKS(PCR, XIOEN, SP)              |
            MCBSP_FMKS(PCR, RIOEN, SP)              |
            MCBSP_FMKS(PCR, FSXM, EXTERNAL)         |
            MCBSP_FMKS(PCR, FSRM, EXTERNAL)         |
            MCBSP_FMKS(PCR, CLKXM, INPUT)           |
            MCBSP_FMKS(PCR, CLKRM, INPUT)           |
            MCBSP_FMKS(PCR, CLKSSTAT, DEFAULT)      |
            MCBSP_FMKS(PCR, DXSTAT, DEFAULT)        |
            MCBSP_FMKS(PCR, FSXP, ACTIVEHIGH)       |
            MCBSP_FMKS(PCR, FSRP, ACTIVEHIGH)       |
            MCBSP_FMKS(PCR, CLKXP, FALLING)         |
            MCBSP_FMKS(PCR, CLKRP, RISING)
    };

     

    Do you see anything in there that would make it not work right?

     

     

  • Hi Theresa,

    I just wanted to make sure that you were properly routing the McBSP pins to the daughter cards instead of to the AIC23B as per Brad's suggestion in this thread. If you've brought DC_DET low and configured the MISC register in the CPLD you should be able to see the McBSP pins toggling (assuming it's started writing).

  • Yup. I have those bits set, but still can't see the signal.

    Actually I am now seeing regular "blips" whenever I try to write, but not a reasonable signal. It just drops to 0 for one or two bits, and then goes back to 1.

     

  • Whoops. Okay, it is working. I needed to increase the sample rate to see it. Had to slow down the clock a bit too.

    I'll post something in a bit.

     

  • Theresa,

    Glad to hear you were able to see the signal. After reading your previous post I was going to suggest this but you beat me to it [:)] Let me know if you have any other issues with this.

  • Turn out it works fine just by stealing the config from the mcbsp example in the examples folder. Even with digital loopback mode on.

    So if anyone else encounters this problem, all they should have to do is take th mcbsp example and switch the CPLD bits:

    ptr  = /(volatile unsigned char *)0x90080006; // Points to offset 6 of the CPLD
    *ptr |= 3;  // sets mcBSP 0 and 1 to off-board