DSPRelated.com
Forums

McBSP data transfer C6711 C6713 boards

Started by vlad...@yahoo.com November 2, 2008
Hi everybody!

I'm new in the DSP world and my entire life depends of this!! i have a very big trouble and i don't know how to fixed out... The questions is as follows:

I have one dsk6711 and one dsk6713. I need to transfer data between them (an array with 128 elements) using McBSP. I'm using the following example code to do that (please see spra455a "Using the TMS320C6000 McBSP as a High Speed Communication Port (Rev. A)" ).

C6711 is master and C6713 is slave. I'm using CCStudio_v3.1 and i have a few questions:

1- I need to make two different projects? (one for C6711 and another for C6713?) how can i run both at the same time using Parallel Debug Manager?

2- The registers in McBSP_config and EDMA_config are ok??

3- What else i need?

Please post code too. Thanks!
Vladimir-

> I'm new in the DSP world and my entire life depends of this!! i have a very big trouble and i don't know how to fixed
> out... The questions is as follows:
>
> I have one dsk6711 and one dsk6713. I need to transfer data between them (an array with 128 elements) using McBSP.
> I'm using the following example code to do that (please see spra455a "Using the TMS320C6000 McBSP as a High Speed
> Communication Port (Rev. A)" ).
>
> C6711 is master and C6713 is slave. I'm using CCStudio_v3.1 and i have a few questions:
>
> 1- I need to make two different projects? (one for C6711 and another for C6713?) how can i run both at the same time
> using Parallel Debug Manager?

CCS software will not open 2 parallel ports or 2 USB ports at the same time. In your case (student newbie), the least
confusing and most likely to work method is two separate projects running on two separate PCs. An alternative is two
separate projects on one PC: get one board running code, leave it running, close CCS, disconnect cable from one DSK,
connect to other DSK, re-open CCS, open the other project, get that code running.

A further hint: get the first board running "wire loopback" over its McBSP. Then you know it's working, all you have
to do is replace the loopback plug with a short cable to the other DSK.

What do I mean about short cable? Where to connect McBSP? Ahh, see comments below.

> 2- The registers in McBSP_config and EDMA_config are ok??
>
> 3- What else i need?
>
> Please post code too. Thanks!

100s of students have been assigned this class project over the last few years. You might get more help on this group
if you show that you've searched the group archives and found the numerous other threads talking about this same
project. Even in the last few weeks there has been discussion with other students that you can benefit from.

If your "life depends on this", then I would expect you to at least show a level of effort that matches your
competitors (i.e. your fellow students).

-Jeff
Vladimir,

On Mon, Nov 3, 2008 at 12:34 PM, Jeff Brower wrote:
> Vladimir-
>
>> I'm new in the DSP world and my entire life depends of this!! i have a
>> very big trouble and i don't know how to fixed
>> out... The questions is as follows:
>>
>> I have one dsk6711 and one dsk6713. I need to transfer data between them
>> (an array with 128 elements) using McBSP.
>> I'm using the following example code to do that (please see spra455a
>> "Using the TMS320C6000 McBSP as a High Speed
>> Communication Port (Rev. A)" ).
>>
>> C6711 is master and C6713 is slave. I'm using CCStudio_v3.1 and i have a
>> few questions:
>>
>> 1- I need to make two different projects? (one for C6711 and another for
>> C6713?) how can i run both at the same time
>> using Parallel Debug Manager?


Yes, you need 2 separate projects.
You *may* be able to open 1 PPort and 1 USB CCS window under PDM [I
have only done this using a full version of CCS].
1. In CCS setup, try selecting a PPort configuration and then adding a
USB configuration.
2. Save your configuration. [NOTE: You may want to edit the name' to
6711DSK and 6713DSK before you 'save' to keep them straight]. If CCS
setup allows you to do this, export the configuration to the
'C:\CCStudio_v3.1\drivers\import' directory. Use this configuration
every time that you bring up CCS - this will ensure a consistent
configuration each time.
3. When you bring up CCS, PDM should come up, allowing you to open
each debug window.

mikedunn
>
> CCS software will not open 2 parallel ports or 2 USB ports at the same time.
> In your case (student newbie), the least
> confusing and most likely to work method is two separate projects running on
> two separate PCs. An alternative is two
> separate projects on one PC: get one board running code, leave it running,
> close CCS, disconnect cable from one DSK,
> connect to other DSK, re-open CCS, open the other project, get that code
> running.
>
> A further hint: get the first board running "wire loopback" over its McBSP.
> Then you know it's working, all you have
> to do is replace the loopback plug with a short cable to the other DSK.
>
> What do I mean about short cable? Where to connect McBSP? Ahh, see comments
> below.
>
>> 2- The registers in McBSP_config and EDMA_config are ok??
>>
>> 3- What else i need?
>>
>> Please post code too. Thanks!
>
> 100s of students have been assigned this class project over the last few
> years. You might get more help on this group
> if you show that you've searched the group archives and found the numerous
> other threads talking about this same
> project. Even in the last few weeks there has been discussion with other
> students that you can benefit from.
>
> If your "life depends on this", then I would expect you to at least show a
> level of effort that matches your
> competitors (i.e. your fellow students).
>
> -Jeff

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Well, i resolved the first question, i did a group using the parallel debug manager (in CCS see help-->contents-->debugging windows & analysis tools-->parallel debug manager-->using groups with PDM+) and i can run the two projects at the same time.
Well i decided to do it using polling instead edma. The transmitter seems to be ok but the reciever don't "see" any incomming data. The connections are:
C6713 C6711
J3 pin(3) GND---> J3 pin(3) GND
J3 pin(21) CLKX0-> J3 pin(27) CLKR0
J3 pin(23) FSX0--> J3 pin(29) FSR0
J3 pin(24) DX0---> J3 pin(30) DR0
And the codes are:

Transmitter (C6713): (using csl6713.lib, rts6700.lib, c6713dsk.cmd)

//*--*/
/* mcbsp_xmit_master.c: */
/*--*/
#include
#include
#include
#include
float outbuffer[128];
float outdata;
MCBSP_Handle hMcbsp0;
void mcbsp0_config(void);

void main(void)
{
Uint32 i;
for (i=0;i<128;i++) {
outbuffer[i]=0x00000000+i;
}
CSL_init();
mcbsp0_config();
MCBSP_enableSrgr(hMcbsp0);
for (i=0; i<0x10; i++);
MCBSP_enableXmt(hMcbsp0);
MCBSP_enableFsync(hMcbsp0);
for (i=0;i<128;i++) {
outdata=outbuffer[i];
while(!MCBSP_xrdy(hMcbsp0));
MCBSP_write(hMcbsp0, outdata);
}
MCBSP_close(hMcbsp0);
}

void mcbsp0_config(void)
{
MCBSP_Config mcbspCfg0 = {
MCBSP_SPCR_RMK(
MCBSP_SPCR_FREE_NO,
MCBSP_SPCR_SOFT_NO,
MCBSP_SPCR_FRST_YES,
MCBSP_SPCR_GRST_YES,
MCBSP_SPCR_XINTM_XRDY,
MCBSP_SPCR_XSYNCERR_NO,
MCBSP_SPCR_XRST_NO,
MCBSP_SPCR_DLB_OFF,
MCBSP_SPCR_RJUST_RZF,
MCBSP_SPCR_CLKSTP_DISABLE,
MCBSP_SPCR_DXENA_OFF,
MCBSP_SPCR_RINTM_RRDY,
MCBSP_SPCR_RSYNCERR_NO,
MCBSP_SPCR_RRST_YES
),
MCBSP_RCR_RMK(
MCBSP_RCR_RPHASE_SINGLE,
MCBSP_RCR_RFRLEN2_OF(0),
MCBSP_RCR_RWDLEN2_8BIT,
MCBSP_RCR_RCOMPAND_MSB,
MCBSP_RCR_RFIG_YES,
MCBSP_RCR_RDATDLY_1BIT,
MCBSP_RCR_RFRLEN1_OF(0),
MCBSP_RCR_RWDLEN1_32BIT,
MCBSP_RCR_RWDREVRS_DISABLE
),
MCBSP_XCR_RMK(
MCBSP_XCR_XPHASE_SINGLE,
MCBSP_XCR_XFRLEN2_OF(0),
MCBSP_XCR_XWDLEN2_8BIT,
MCBSP_XCR_XCOMPAND_MSB,
MCBSP_XCR_XFIG_YES,
MCBSP_XCR_XDATDLY_1BIT,
MCBSP_XCR_XFRLEN1_OF(0),
MCBSP_XCR_XWDLEN1_32BIT,
MCBSP_XCR_XWDREVRS_DISABLE
),
MCBSP_SRGR_RMK(
MCBSP_SRGR_GSYNC_FREE,
MCBSP_SRGR_CLKSP_RISING,
MCBSP_SRGR_CLKSM_INTERNAL,
MCBSP_SRGR_FSGM_DXR2XSR,
MCBSP_SRGR_FPER_OF(4095),
MCBSP_SRGR_FWID_OF(2),
MCBSP_SRGR_CLKGDV_OF(255)
),
MCBSP_MCR_DEFAULT,
MCBSP_RCER_DEFAULT,
MCBSP_XCER_DEFAULT,
MCBSP_PCR_RMK(
MCBSP_PCR_XIOEN_SP,
MCBSP_PCR_RIOEN_SP,
MCBSP_PCR_FSXM_INTERNAL,
MCBSP_PCR_FSRM_EXTERNAL,
MCBSP_PCR_CLKXM_OUTPUT,
MCBSP_PCR_CLKRM_INPUT,
MCBSP_PCR_CLKSSTAT_0,
MCBSP_PCR_DXSTAT_DEFAULT,
MCBSP_PCR_FSXP_ACTIVEHIGH,
MCBSP_PCR_FSRP_ACTIVEHIGH,
MCBSP_PCR_CLKXP_RISING,
MCBSP_PCR_CLKRP_FALLING
)
};
hMcbsp0 = MCBSP_open(MCBSP_DEV0, MCBSP_OPEN_RESET);
MCBSP_config(hMcbsp0, &mcbspCfg0);
return;
}
//-----------------------End of mcbsp_xmit_master.c---------------------

Reciever (C6711): (using rts6700.lib, csl6711.lib, c6xdsk.cmd)

//*--*/
/* mcbsp_recv_slave.c: */
/*--*/
#include
#include
#include
#include
float inbuffer[128];
float indata;
MCBSP_Handle hMcbsp0;
void mcbsp0_config(void);

void main(void)
{
Uint32 i;
CSL_init();
mcbsp0_config();
MCBSP_enableRcv(hMcbsp0);
MCBSP_enableFsync(hMcbsp0);
for (i=0;i<128;i++) {
while(!MCBSP_rrdy(hMcbsp0));
indata = MCBSP_read(hMcbsp0);
inbuffer[i]=indata;
}
MCBSP_close(hMcbsp0);
}

void mcbsp0_config(void)
{
MCBSP_Config mcbspCfg0 = {
MCBSP_SPCR_RMK(
MCBSP_SPCR_FREE_NO,
MCBSP_SPCR_SOFT_NO,
MCBSP_SPCR_FRST_YES,
MCBSP_SPCR_GRST_YES,
MCBSP_SPCR_XINTM_XRDY,
MCBSP_SPCR_XSYNCERR_NO,
MCBSP_SPCR_XRST_NO,
MCBSP_SPCR_DLB_OFF,
MCBSP_SPCR_RJUST_RZF,
MCBSP_SPCR_CLKSTP_DISABLE,
MCBSP_SPCR_DXENA_OFF,
MCBSP_SPCR_RINTM_RRDY,
MCBSP_SPCR_RSYNCERR_NO,
MCBSP_SPCR_RRST_YES
),
MCBSP_RCR_RMK(
MCBSP_RCR_RPHASE_SINGLE,
MCBSP_RCR_RFRLEN2_OF(0),
MCBSP_RCR_RWDLEN2_8BIT,
MCBSP_RCR_RCOMPAND_MSB,
MCBSP_RCR_RFIG_YES,
MCBSP_RCR_RDATDLY_1BIT,
MCBSP_RCR_RFRLEN1_OF(0),
MCBSP_RCR_RWDLEN1_32BIT,
MCBSP_RCR_RWDREVRS_DISABLE
),
MCBSP_XCR_RMK(
MCBSP_XCR_XPHASE_SINGLE,
MCBSP_XCR_XFRLEN2_OF(0),
MCBSP_XCR_XWDLEN2_8BIT,
MCBSP_XCR_XCOMPAND_MSB,
MCBSP_XCR_XFIG_YES,
MCBSP_XCR_XDATDLY_1BIT,
MCBSP_XCR_XFRLEN1_OF(0),
MCBSP_XCR_XWDLEN1_32BIT,
MCBSP_XCR_XWDREVRS_DISABLE
),
MCBSP_SRGR_RMK(
MCBSP_SRGR_GSYNC_FREE,
MCBSP_SRGR_CLKSP_RISING,
MCBSP_SRGR_CLKSM_INTERNAL,
MCBSP_SRGR_FSGM_DXR2XSR,
MCBSP_SRGR_FPER_OF(4095),
MCBSP_SRGR_FWID_OF(2),
MCBSP_SRGR_CLKGDV_OF(255)
),
MCBSP_MCR_DEFAULT,
MCBSP_RCER_DEFAULT,
MCBSP_XCER_DEFAULT,
MCBSP_PCR_RMK(
MCBSP_PCR_XIOEN_SP,
MCBSP_PCR_RIOEN_SP,
MCBSP_PCR_FSXM_INTERNAL,
MCBSP_PCR_FSRM_EXTERNAL,
MCBSP_PCR_CLKXM_OUTPUT,
MCBSP_PCR_CLKRM_INPUT,
MCBSP_PCR_CLKSSTAT_0,
MCBSP_PCR_DXSTAT_DEFAULT,
MCBSP_PCR_FSXP_ACTIVEHIGH,
MCBSP_PCR_FSRP_ACTIVEHIGH,
MCBSP_PCR_CLKXP_RISING,
MCBSP_PCR_CLKRP_FALLING
)
};
hMcbsp0 = MCBSP_open(MCBSP_DEV0, MCBSP_OPEN_RESET);
MCBSP_config(hMcbsp0, &mcbspCfg0);
return;
}
//-----------------------End of mcbsp_xmit_master.c---------------------

vecs.asm:

/************************************************************/
.global _vectors
.global _c_int00
.global _vector1
.global _vector2
.global _vector3
.global _vector4
.global _vector5
.global _vector6
.global _vector7
.global _vector8
.global _vector09
.global _vector10
.global _vector11
.global _vector12
.global _vector13
.global _vector14
.global _vector15

.ref _c_int00

VEC_ENTRY .macro addr
STW B0,*--B15
MVKL addr,B0
MVKH addr,B0
B B0
LDW *B15++,B0
NOP 2
NOP
NOP
.endm

_vec_dummy:
B B3
NOP 5

.sect ".vecs"
.align 1024

_vectors:
_vector0: VEC_ENTRY _c_int00
_vector1: VEC_ENTRY _vec_dummy
_vector2: VEC_ENTRY _vec_dummy
_vector3: VEC_ENTRY _vec_dummy
_vector4: VEC_ENTRY _vec_dummy
_vector5: VEC_ENTRY _vec_dummy
_vector6: VEC_ENTRY _vec_dummy
_vector7: VEC_ENTRY _vec_dummy
_vector8: VEC_ENTRY _vec_dummy
_vector9: VEC_ENTRY _vec_dummy
_vector10: VEC_ENTRY _vec_dummy
_vector11: VEC_ENTRY _vec_dummy
_vector12: VEC_ENTRY _vec_dummy
_vector13: VEC_ENTRY _vec_dummy
_vector14: VEC_ENTRY _vec_dummy
_vector15: VEC_ENTRY _vec_dummy
********************************************************************************
* End of vecs.asm
********************************************************************************

I can see the outdata in DXR register in the side of the transmitter but there is no successful comunication .
vladimir,

On Mon, Dec 1, 2008 at 2:09 PM, wrote:
>
> Well i decided to do it using polling instead edma. The transmitter seems to
> be ok but the reciever don't "see" any incomming data. The connections are:
> C6713 C6711
> J3 pin(3) GND---> J3 pin(3) GND
> J3 pin(21) CLKX0-> J3 pin(27) CLKR0
> J3 pin(23) FSX0--> J3 pin(29) FSR0
> J3 pin(24) DX0---> J3 pin(30) DR0


I have not looked at the code, but...
Q1. Did you install the JP1 jumper on the 6711 board to enable the
McBSP to talk to the DCard instead of the codec??
Q2. Did you program 'CPLD_MCBSP0_MUX' to enable the McBSP to talk to the DCard??

mikedunn
>
> And the codes are:
>
> Transmitter (C6713): (using csl6713.lib, rts6700.lib, c6713dsk.cmd)
>
> //*----------------------*/
> /* mcbsp_xmit_master.c: */
> /*----------------------*/
> #include
> #include
> #include
> #include
> float outbuffer[128];
> float outdata;
> MCBSP_Handle hMcbsp0;
> void mcbsp0_config(void);
>
> void main(void)
> {
> Uint32 i;
> for (i=0;i<128;i++) {
> outbuffer[i]=0x00000000+i;
> }
> CSL_init();
> mcbsp0_config();
> MCBSP_enableSrgr(hMcbsp0);
> for (i=0; i<0x10; i++);
> MCBSP_enableXmt(hMcbsp0);
> MCBSP_enableFsync(hMcbsp0);
> for (i=0;i<128;i++) {
> outdata=outbuffer[i];
> while(!MCBSP_xrdy(hMcbsp0));
> MCBSP_write(hMcbsp0, outdata);
> }
> MCBSP_close(hMcbsp0);
> }
>
> void mcbsp0_config(void)
> {
> MCBSP_Config mcbspCfg0 = {
> MCBSP_SPCR_RMK(
> MCBSP_SPCR_FREE_NO,
> MCBSP_SPCR_SOFT_NO,
> MCBSP_SPCR_FRST_YES,
> MCBSP_SPCR_GRST_YES,
> MCBSP_SPCR_XINTM_XRDY,
> MCBSP_SPCR_XSYNCERR_NO,
> MCBSP_SPCR_XRST_NO,
> MCBSP_SPCR_DLB_OFF,
> MCBSP_SPCR_RJUST_RZF,
> MCBSP_SPCR_CLKSTP_DISABLE,
> MCBSP_SPCR_DXENA_OFF,
> MCBSP_SPCR_RINTM_RRDY,
> MCBSP_SPCR_RSYNCERR_NO,
> MCBSP_SPCR_RRST_YES
> ),
> MCBSP_RCR_RMK(
> MCBSP_RCR_RPHASE_SINGLE,
> MCBSP_RCR_RFRLEN2_OF(0),
> MCBSP_RCR_RWDLEN2_8BIT,
> MCBSP_RCR_RCOMPAND_MSB,
> MCBSP_RCR_RFIG_YES,
> MCBSP_RCR_RDATDLY_1BIT,
> MCBSP_RCR_RFRLEN1_OF(0),
> MCBSP_RCR_RWDLEN1_32BIT,
> MCBSP_RCR_RWDREVRS_DISABLE
> ),
> MCBSP_XCR_RMK(
> MCBSP_XCR_XPHASE_SINGLE,
> MCBSP_XCR_XFRLEN2_OF(0),
> MCBSP_XCR_XWDLEN2_8BIT,
> MCBSP_XCR_XCOMPAND_MSB,
> MCBSP_XCR_XFIG_YES,
> MCBSP_XCR_XDATDLY_1BIT,
> MCBSP_XCR_XFRLEN1_OF(0),
> MCBSP_XCR_XWDLEN1_32BIT,
> MCBSP_XCR_XWDREVRS_DISABLE
> ),
> MCBSP_SRGR_RMK(
> MCBSP_SRGR_GSYNC_FREE,
> MCBSP_SRGR_CLKSP_RISING,
> MCBSP_SRGR_CLKSM_INTERNAL,
> MCBSP_SRGR_FSGM_DXR2XSR,
> MCBSP_SRGR_FPER_OF(4095),
> MCBSP_SRGR_FWID_OF(2),
> MCBSP_SRGR_CLKGDV_OF(255)
> ),
> MCBSP_MCR_DEFAULT,
> MCBSP_RCER_DEFAULT,
> MCBSP_XCER_DEFAULT,
> MCBSP_PCR_RMK(
> MCBSP_PCR_XIOEN_SP,
> MCBSP_PCR_RIOEN_SP,
> MCBSP_PCR_FSXM_INTERNAL,
> MCBSP_PCR_FSRM_EXTERNAL,
> MCBSP_PCR_CLKXM_OUTPUT,
> MCBSP_PCR_CLKRM_INPUT,
> MCBSP_PCR_CLKSSTAT_0,
> MCBSP_PCR_DXSTAT_DEFAULT,
> MCBSP_PCR_FSXP_ACTIVEHIGH,
> MCBSP_PCR_FSRP_ACTIVEHIGH,
> MCBSP_PCR_CLKXP_RISING,
> MCBSP_PCR_CLKRP_FALLING
> )
> };
> hMcbsp0 = MCBSP_open(MCBSP_DEV0, MCBSP_OPEN_RESET);
> MCBSP_config(hMcbsp0, &mcbspCfg0);
> return;
> }
> //-----------------------End of mcbsp_xmit_master.c---------------------
>
> Reciever (C6711): (using rts6700.lib, csl6711.lib, c6xdsk.cmd)
>
> //*----------------------*/
> /* mcbsp_recv_slave.c: */
> /*----------------------*/
> #include
> #include
> #include
> #include
> float inbuffer[128];
> float indata;
> MCBSP_Handle hMcbsp0;
> void mcbsp0_config(void);
>
> void main(void)
> {
> Uint32 i;
> CSL_init();
> mcbsp0_config();
> MCBSP_enableRcv(hMcbsp0);
> MCBSP_enableFsync(hMcbsp0);
> for (i=0;i<128;i++) {
> while(!MCBSP_rrdy(hMcbsp0));
> indata = MCBSP_read(hMcbsp0);
> inbuffer[i]=indata;
> }
> MCBSP_close(hMcbsp0);
> }
>
> void mcbsp0_config(void)
> {
> MCBSP_Config mcbspCfg0 = {
> MCBSP_SPCR_RMK(
> MCBSP_SPCR_FREE_NO,
> MCBSP_SPCR_SOFT_NO,
> MCBSP_SPCR_FRST_YES,
> MCBSP_SPCR_GRST_YES,
> MCBSP_SPCR_XINTM_XRDY,
> MCBSP_SPCR_XSYNCERR_NO,
> MCBSP_SPCR_XRST_NO,
> MCBSP_SPCR_DLB_OFF,
> MCBSP_SPCR_RJUST_RZF,
> MCBSP_SPCR_CLKSTP_DISABLE,
> MCBSP_SPCR_DXENA_OFF,
> MCBSP_SPCR_RINTM_RRDY,
> MCBSP_SPCR_RSYNCERR_NO,
> MCBSP_SPCR_RRST_YES
> ),
> MCBSP_RCR_RMK(
> MCBSP_RCR_RPHASE_SINGLE,
> MCBSP_RCR_RFRLEN2_OF(0),
> MCBSP_RCR_RWDLEN2_8BIT,
> MCBSP_RCR_RCOMPAND_MSB,
> MCBSP_RCR_RFIG_YES,
> MCBSP_RCR_RDATDLY_1BIT,
> MCBSP_RCR_RFRLEN1_OF(0),
> MCBSP_RCR_RWDLEN1_32BIT,
> MCBSP_RCR_RWDREVRS_DISABLE
> ),
> MCBSP_XCR_RMK(
> MCBSP_XCR_XPHASE_SINGLE,
> MCBSP_XCR_XFRLEN2_OF(0),
> MCBSP_XCR_XWDLEN2_8BIT,
> MCBSP_XCR_XCOMPAND_MSB,
> MCBSP_XCR_XFIG_YES,
> MCBSP_XCR_XDATDLY_1BIT,
> MCBSP_XCR_XFRLEN1_OF(0),
> MCBSP_XCR_XWDLEN1_32BIT,
> MCBSP_XCR_XWDREVRS_DISABLE
> ),
> MCBSP_SRGR_RMK(
> MCBSP_SRGR_GSYNC_FREE,
> MCBSP_SRGR_CLKSP_RISING,
> MCBSP_SRGR_CLKSM_INTERNAL,
> MCBSP_SRGR_FSGM_DXR2XSR,
> MCBSP_SRGR_FPER_OF(4095),
> MCBSP_SRGR_FWID_OF(2),
> MCBSP_SRGR_CLKGDV_OF(255)
> ),
> MCBSP_MCR_DEFAULT,
> MCBSP_RCER_DEFAULT,
> MCBSP_XCER_DEFAULT,
> MCBSP_PCR_RMK(
> MCBSP_PCR_XIOEN_SP,
> MCBSP_PCR_RIOEN_SP,
> MCBSP_PCR_FSXM_INTERNAL,
> MCBSP_PCR_FSRM_EXTERNAL,
> MCBSP_PCR_CLKXM_OUTPUT,
> MCBSP_PCR_CLKRM_INPUT,
> MCBSP_PCR_CLKSSTAT_0,
> MCBSP_PCR_DXSTAT_DEFAULT,
> MCBSP_PCR_FSXP_ACTIVEHIGH,
> MCBSP_PCR_FSRP_ACTIVEHIGH,
> MCBSP_PCR_CLKXP_RISING,
> MCBSP_PCR_CLKRP_FALLING
> )
> };
> hMcbsp0 = MCBSP_open(MCBSP_DEV0, MCBSP_OPEN_RESET);
> MCBSP_config(hMcbsp0, &mcbspCfg0);
> return;
> }
> //-----------------------End of mcbsp_xmit_master.c---------------------
>
> vecs.asm:
>
> /************************************************************/
> .global _vectors
> .global _c_int00
> .global _vector1
> .global _vector2
> .global _vector3
> .global _vector4
> .global _vector5
> .global _vector6
> .global _vector7
> .global _vector8
> .global _vector09
> .global _vector10
> .global _vector11
> .global _vector12
> .global _vector13
> .global _vector14
> .global _vector15
>
> .ref _c_int00
>
> VEC_ENTRY .macro addr
> STW B0,*--B15
> MVKL addr,B0
> MVKH addr,B0
> B B0
> LDW *B15++,B0
> NOP 2
> NOP
> NOP
> .endm
>
> _vec_dummy:
> B B3
> NOP 5
>
> .sect ".vecs"
> .align 1024
>
> _vectors:
> _vector0: VEC_ENTRY _c_int00
> _vector1: VEC_ENTRY _vec_dummy
> _vector2: VEC_ENTRY _vec_dummy
> _vector3: VEC_ENTRY _vec_dummy
> _vector4: VEC_ENTRY _vec_dummy
> _vector5: VEC_ENTRY _vec_dummy
> _vector6: VEC_ENTRY _vec_dummy
> _vector7: VEC_ENTRY _vec_dummy
> _vector8: VEC_ENTRY _vec_dummy
> _vector9: VEC_ENTRY _vec_dummy
> _vector10: VEC_ENTRY _vec_dummy
> _vector11: VEC_ENTRY _vec_dummy
> _vector12: VEC_ENTRY _vec_dummy
> _vector13: VEC_ENTRY _vec_dummy
> _vector14: VEC_ENTRY _vec_dummy
> _vector15: VEC_ENTRY _vec_dummy
> ********************************************************************************
> * End of vecs.asm
> ********************************************************************************
>
> I can see the outdata in DXR register in the side of the transmitter but
> there is no successful comunication .

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Look at what they told me when I had a troulble with 6416. Hopefully, this
can help.
furhter more, I believe you can try the loop back mode to test 6713 to
make sure both Tx and Rx are working ok.
Please let me know if you need the code to test 6713 (I did try this and
it worked ok. From there you can modify based on your application)
You also can find this exmaple code under .......6713\BIOS or something
like that when install the CCS.

Good luck!.
Tung Nguyen

Many of the daughtercard signals on the daughtercard connectors are routed
through buffers to enable them. This can be done by shorting the DC_DET
pin (pin 75) on the Peripheral connector to ground.

Your findings might be a result of the software application you are using.
Texas Instruments might be able to help you determine if this is the
case.

Regards,
Danny Corey

Spectrum Digital, Inc.
tel: 281-494-4500 ext. 113
fax: 281-494-5310
web: www.spectrumdigital.com

Need Support? Try http://support.spectrumdigital.com/

"Michael Dunn"
Sent by: c...
12/01/2008 02:52 PM

To
v...@yahoo.com
cc
c...
Subject
Re: [c6x] Re: McBSP data transfer C6711 C6713 boards

vladimir,

On Mon, Dec 1, 2008 at 2:09 PM, wrote:
>
> Well i decided to do it using polling instead edma. The transmitter
seems to
> be ok but the reciever don't "see" any incomming data. The connections
are:
> C6713 C6711
> J3 pin(3) GND---> J3 pin(3) GND
> J3 pin(21) CLKX0-> J3 pin(27) CLKR0
> J3 pin(23) FSX0--> J3 pin(29) FSR0
> J3 pin(24) DX0---> J3 pin(30) DR0


I have not looked at the code, but...
Q1. Did you install the JP1 jumper on the 6711 board to enable the
McBSP to talk to the DCard instead of the codec??
Q2. Did you program 'CPLD_MCBSP0_MUX' to enable the McBSP to talk to the
DCard??

mikedunn
>
> And the codes are:
>
> Transmitter (C6713): (using csl6713.lib, rts6700.lib, c6713dsk.cmd)
>
> //*----------------------*/
> /* mcbsp_xmit_master.c: */
> /*----------------------*/
> #include
> #include
> #include
> #include
> float outbuffer[128];
> float outdata;
> MCBSP_Handle hMcbsp0;
> void mcbsp0_config(void);
>
> void main(void)
> {
> Uint32 i;
> for (i=0;i<128;i++) {
> outbuffer[i]=0x00000000+i;
> }
> CSL_init();
> mcbsp0_config();
> MCBSP_enableSrgr(hMcbsp0);
> for (i=0; i<0x10; i++);
> MCBSP_enableXmt(hMcbsp0);
> MCBSP_enableFsync(hMcbsp0);
> for (i=0;i<128;i++) {
> outdata=outbuffer[i];
> while(!MCBSP_xrdy(hMcbsp0));
> MCBSP_write(hMcbsp0, outdata);
> }
> MCBSP_close(hMcbsp0);
> }
>
> void mcbsp0_config(void)
> {
> MCBSP_Config mcbspCfg0 = {
> MCBSP_SPCR_RMK(
> MCBSP_SPCR_FREE_NO,
> MCBSP_SPCR_SOFT_NO,
> MCBSP_SPCR_FRST_YES,
> MCBSP_SPCR_GRST_YES,
> MCBSP_SPCR_XINTM_XRDY,
> MCBSP_SPCR_XSYNCERR_NO,
> MCBSP_SPCR_XRST_NO,
> MCBSP_SPCR_DLB_OFF,
> MCBSP_SPCR_RJUST_RZF,
> MCBSP_SPCR_CLKSTP_DISABLE,
> MCBSP_SPCR_DXENA_OFF,
> MCBSP_SPCR_RINTM_RRDY,
> MCBSP_SPCR_RSYNCERR_NO,
> MCBSP_SPCR_RRST_YES
> ),
> MCBSP_RCR_RMK(
> MCBSP_RCR_RPHASE_SINGLE,
> MCBSP_RCR_RFRLEN2_OF(0),
> MCBSP_RCR_RWDLEN2_8BIT,
> MCBSP_RCR_RCOMPAND_MSB,
> MCBSP_RCR_RFIG_YES,
> MCBSP_RCR_RDATDLY_1BIT,
> MCBSP_RCR_RFRLEN1_OF(0),
> MCBSP_RCR_RWDLEN1_32BIT,
> MCBSP_RCR_RWDREVRS_DISABLE
> ),
> MCBSP_XCR_RMK(
> MCBSP_XCR_XPHASE_SINGLE,
> MCBSP_XCR_XFRLEN2_OF(0),
> MCBSP_XCR_XWDLEN2_8BIT,
> MCBSP_XCR_XCOMPAND_MSB,
> MCBSP_XCR_XFIG_YES,
> MCBSP_XCR_XDATDLY_1BIT,
> MCBSP_XCR_XFRLEN1_OF(0),
> MCBSP_XCR_XWDLEN1_32BIT,
> MCBSP_XCR_XWDREVRS_DISABLE
> ),
> MCBSP_SRGR_RMK(
> MCBSP_SRGR_GSYNC_FREE,
> MCBSP_SRGR_CLKSP_RISING,
> MCBSP_SRGR_CLKSM_INTERNAL,
> MCBSP_SRGR_FSGM_DXR2XSR,
> MCBSP_SRGR_FPER_OF(4095),
> MCBSP_SRGR_FWID_OF(2),
> MCBSP_SRGR_CLKGDV_OF(255)
> ),
> MCBSP_MCR_DEFAULT,
> MCBSP_RCER_DEFAULT,
> MCBSP_XCER_DEFAULT,
> MCBSP_PCR_RMK(
> MCBSP_PCR_XIOEN_SP,
> MCBSP_PCR_RIOEN_SP,
> MCBSP_PCR_FSXM_INTERNAL,
> MCBSP_PCR_FSRM_EXTERNAL,
> MCBSP_PCR_CLKXM_OUTPUT,
> MCBSP_PCR_CLKRM_INPUT,
> MCBSP_PCR_CLKSSTAT_0,
> MCBSP_PCR_DXSTAT_DEFAULT,
> MCBSP_PCR_FSXP_ACTIVEHIGH,
> MCBSP_PCR_FSRP_ACTIVEHIGH,
> MCBSP_PCR_CLKXP_RISING,
> MCBSP_PCR_CLKRP_FALLING
> )
> };
> hMcbsp0 = MCBSP_open(MCBSP_DEV0, MCBSP_OPEN_RESET);
> MCBSP_config(hMcbsp0, &mcbspCfg0);
> return;
> }
> //-----------------------End of mcbsp_xmit_master.c---------------------
>
> Reciever (C6711): (using rts6700.lib, csl6711.lib, c6xdsk.cmd)
>
> //*----------------------*/
> /* mcbsp_recv_slave.c: */
> /*----------------------*/
> #include
> #include
> #include
> #include
> float inbuffer[128];
> float indata;
> MCBSP_Handle hMcbsp0;
> void mcbsp0_config(void);
>
> void main(void)
> {
> Uint32 i;
> CSL_init();
> mcbsp0_config();
> MCBSP_enableRcv(hMcbsp0);
> MCBSP_enableFsync(hMcbsp0);
> for (i=0;i<128;i++) {
> while(!MCBSP_rrdy(hMcbsp0));
> indata = MCBSP_read(hMcbsp0);
> inbuffer[i]=indata;
> }
> MCBSP_close(hMcbsp0);
> }
>
> void mcbsp0_config(void)
> {
> MCBSP_Config mcbspCfg0 = {
> MCBSP_SPCR_RMK(
> MCBSP_SPCR_FREE_NO,
> MCBSP_SPCR_SOFT_NO,
> MCBSP_SPCR_FRST_YES,
> MCBSP_SPCR_GRST_YES,
> MCBSP_SPCR_XINTM_XRDY,
> MCBSP_SPCR_XSYNCERR_NO,
> MCBSP_SPCR_XRST_NO,
> MCBSP_SPCR_DLB_OFF,
> MCBSP_SPCR_RJUST_RZF,
> MCBSP_SPCR_CLKSTP_DISABLE,
> MCBSP_SPCR_DXENA_OFF,
> MCBSP_SPCR_RINTM_RRDY,
> MCBSP_SPCR_RSYNCERR_NO,
> MCBSP_SPCR_RRST_YES
> ),
> MCBSP_RCR_RMK(
> MCBSP_RCR_RPHASE_SINGLE,
> MCBSP_RCR_RFRLEN2_OF(0),
> MCBSP_RCR_RWDLEN2_8BIT,
> MCBSP_RCR_RCOMPAND_MSB,
> MCBSP_RCR_RFIG_YES,
> MCBSP_RCR_RDATDLY_1BIT,
> MCBSP_RCR_RFRLEN1_OF(0),
> MCBSP_RCR_RWDLEN1_32BIT,
> MCBSP_RCR_RWDREVRS_DISABLE
> ),
> MCBSP_XCR_RMK(
> MCBSP_XCR_XPHASE_SINGLE,
> MCBSP_XCR_XFRLEN2_OF(0),
> MCBSP_XCR_XWDLEN2_8BIT,
> MCBSP_XCR_XCOMPAND_MSB,
> MCBSP_XCR_XFIG_YES,
> MCBSP_XCR_XDATDLY_1BIT,
> MCBSP_XCR_XFRLEN1_OF(0),
> MCBSP_XCR_XWDLEN1_32BIT,
> MCBSP_XCR_XWDREVRS_DISABLE
> ),
> MCBSP_SRGR_RMK(
> MCBSP_SRGR_GSYNC_FREE,
> MCBSP_SRGR_CLKSP_RISING,
> MCBSP_SRGR_CLKSM_INTERNAL,
> MCBSP_SRGR_FSGM_DXR2XSR,
> MCBSP_SRGR_FPER_OF(4095),
> MCBSP_SRGR_FWID_OF(2),
> MCBSP_SRGR_CLKGDV_OF(255)
> ),
> MCBSP_MCR_DEFAULT,
> MCBSP_RCER_DEFAULT,
> MCBSP_XCER_DEFAULT,
> MCBSP_PCR_RMK(
> MCBSP_PCR_XIOEN_SP,
> MCBSP_PCR_RIOEN_SP,
> MCBSP_PCR_FSXM_INTERNAL,
> MCBSP_PCR_FSRM_EXTERNAL,
> MCBSP_PCR_CLKXM_OUTPUT,
> MCBSP_PCR_CLKRM_INPUT,
> MCBSP_PCR_CLKSSTAT_0,
> MCBSP_PCR_DXSTAT_DEFAULT,
> MCBSP_PCR_FSXP_ACTIVEHIGH,
> MCBSP_PCR_FSRP_ACTIVEHIGH,
> MCBSP_PCR_CLKXP_RISING,
> MCBSP_PCR_CLKRP_FALLING
> )
> };
> hMcbsp0 = MCBSP_open(MCBSP_DEV0, MCBSP_OPEN_RESET);
> MCBSP_config(hMcbsp0, &mcbspCfg0);
> return;
> }
> //-----------------------End of mcbsp_xmit_master.c---------------------
>
> vecs.asm:
>
> /************************************************************/
> .global _vectors
> .global _c_int00
> .global _vector1
> .global _vector2
> .global _vector3
> .global _vector4
> .global _vector5
> .global _vector6
> .global _vector7
> .global _vector8
> .global _vector09
> .global _vector10
> .global _vector11
> .global _vector12
> .global _vector13
> .global _vector14
> .global _vector15
>
> .ref _c_int00
>
> VEC_ENTRY .macro addr
> STW B0,*--B15
> MVKL addr,B0
> MVKH addr,B0
> B B0
> LDW *B15++,B0
> NOP 2
> NOP
> NOP
> .endm
>
> _vec_dummy:
> B B3
> NOP 5
>
> .sect ".vecs"
> .align 1024
>
> _vectors:
> _vector0: VEC_ENTRY _c_int00
> _vector1: VEC_ENTRY _vec_dummy
> _vector2: VEC_ENTRY _vec_dummy
> _vector3: VEC_ENTRY _vec_dummy
> _vector4: VEC_ENTRY _vec_dummy
> _vector5: VEC_ENTRY _vec_dummy
> _vector6: VEC_ENTRY _vec_dummy
> _vector7: VEC_ENTRY _vec_dummy
> _vector8: VEC_ENTRY _vec_dummy
> _vector9: VEC_ENTRY _vec_dummy
> _vector10: VEC_ENTRY _vec_dummy
> _vector11: VEC_ENTRY _vec_dummy
> _vector12: VEC_ENTRY _vec_dummy
> _vector13: VEC_ENTRY _vec_dummy
> _vector14: VEC_ENTRY _vec_dummy
> _vector15: VEC_ENTRY _vec_dummy
>
********************************************************************************
> * End of vecs.asm
>
********************************************************************************
>
> I can see the outdata in DXR register in the side of the transmitter but
> there is no successful comunication .

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Thanks to everybody for this fast response. Well, i tried to put together both codes, transmmitter and reciever in digital loop back mode (only changing to MCBSP_SPCR_DLB_ON and MCBSP_PCR_FSRM_INTERNAL), and i tested in both boards and it seems to work without failures (in ccs the dxr and drr mcbsp registers have the same values and both buffers outbuffer and inbuffer are exactly the same) so i think is a hardware trouble, but anyway, Tung, maybe will be useful to have the code to test it ... i will appreciate it.

Mike... about the JP1 jumper and the 'CPLD_MCBSP0_MUX'... i don't have any idea what your talking about jaja but please, could you explain me in detail because i believe that will help me a lot, thanks!!
vladimir,

On Tue, Dec 2, 2008 at 5:36 AM, wrote:
>
> Thanks to everybody for this fast response. Well, i tried to put together
> both codes, transmmitter and reciever in digital loop back mode (only
> changing to MCBSP_SPCR_DLB_ON and MCBSP_PCR_FSRM_INTERNAL), and i tested in
> both boards and it seems to work without failures (in ccs the dxr and drr
> mcbsp registers have the same values and both buffers outbuffer and inbuffer
> are exactly the same) so i think is a hardware trouble, but anyway, Tung,
> maybe will be useful to have the code to test it ... i will appreciate it.
>
> Mike... about the JP1 jumper and the 'CPLD_MCBSP0_MUX'... i don't have any
> idea what your talking about jaja but please, could you explain me in detail
> because i believe that will help me a lot, thanks!!


The McBSP can be connected to the 'on board codec' OR the daughtercard.
The 6711 DSK has a physical jumper, JP1. Refer to the schematics -
look on sheet 1 for "daughtercard peripheral connect".
The 6713 DSK uses a software switch to do the same function. Refer to
the schematics - somewhere around page 13/15. Also look in the tech
ref manual - do a search for CPLD_MCBSP0_MUX'.

mikedunn

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Thank you Mike!! i'm very happy because the communication "it's alive" jeje what i did was, in the C6711 use the McBSP1 port because it's always available and in the C6713 i use the McBSP0 and i wrote the lines for the CPLD:
#define DSK_MISC_REG (*(volatile unsigned char *)(0x90080006)) in the header
and
DSK_MISC_REG |= 1;
in main, The communication it's not perfect yet because the first 200-250 elements are always lose but it's a start. Maybe i could use the EDMA controller or something instead polling.