Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5

Ads

Discussion Groups

Discussion Groups | TMS320C55x | Interfacing with MCBSP on the 5510 DSP

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

Interfacing with MCBSP on the 5510 DSP - dementedstatus - Jan 3 21:43:36 2008



Hi,

I'm having trouble performing a simple interface with the MCBSPs on
the board. My main goal right now is just to write a value to a MCBSP
and read the value back out. My main problem is although I initialize
MCBSP for both transmit and receive with MCBSP_start(hMcbsp0,
MCBSP_RCV_START | MCBSP_XMIT_START | MCBSP_SRGR_START|
MCBSP_SRGR_FRAMESYNC, 0). 

After writing a value to hMcbsp0, the buffer isn't ready to let me
read from it. I always get a 0 for MCBSP_rrdy(hMcbsp0), but I get a 1
for MCBSP_xrdy(hMcbsp0). 

The header files I use are csl, csl_irq, csl_mcbsp, dsk5510.

Any suggestions?

Thank you,
Sammy



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: Interfacing with MCBSP on the 5510 DSP - Xiang Chao - Jan 6 9:36:14 2008

You must make sure that the device on the other end has send you something.
----- =D4=AD=CA=BC=D3=CA=BC=FE ----
=B7=A2=BC=FE=C8=CB=A3=BA dementedstatus <s...@gmail.com>
=CA=D5=BC=FE=C8=CB=A3=BA c...@yahoogroups.com
=D2=D1=B7=A2=CB=CD=A3=BA 2008/1/4(=D6=DC=CE=E5), =C9=CF=CE=E74:59:45
=D6=F7=CC=E2=A3=BA [c55x] Interfacing with MCBSP on the 5510 DSP

Hi,

I'm having trouble performing a simple interface with the MCBSPs on
the board. My main goal right now is just to write a value to a MCBSP
and read the value back out. My main problem is although I initialize
MCBSP for both transmit and receive with MCBSP_start( hMcbsp0,
MCBSP_RCV_START | MCBSP_XMIT_START | MCBSP_SRGR_START|
MCBSP_SRGR_FRAMESYN C, 0).=20

After writing a value to hMcbsp0, the buffer isn't ready to let me
read from it. I always get a 0 for MCBSP_rrdy(hMcbsp0) , but I get a 1
for MCBSP_xrdy(hMcbsp0) .=20

The header files I use are csl, csl_irq, csl_mcbsp, dsk5510.

Any suggestions?

Thank you,
Sammy

=20


(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: Interfacing with MCBSP on the 5510 DSP - dementedstatus - Jan 9 0:08:41 2008

I've been trying to wait for it and I don't think the MCBSPs have ever
returned a 1 for the MCBSP_rrdy(). I actually have a question
regarding which value I'm suppose to wait for from the MCBSP_rrdy().
>From the examples I've looked at, I see users use "while
(!MCBSP_rrdy(Mcbsp0))" and then read from the buffers, but if
MCBSP_rrdy()=3D0, doesn't that mean that the buffers are not ready to be
read? And wouldn't the statements within the while loop be reading
from the buffers when rrdy=3D0?

The point of my code is to just write to a buffer, hMcbsp0, and read
back that value from it. The code I have is pasted below.=20

I'm not sure if I have everything correctly. The MCBSP_Open and
MCBSP_Config are declared in some other files that were generated
using the cdb file that I have. Within it has the config and open
declarations. It's called through the "DAC8831_5510cfg.h."

/*Declarations*/
#define BLOCK_SZ 1024 /* size of data buffer */=20

/* CSL device build option */
#define    CHIP_5510PG2_2          (1)

/* Header file */
#include "csl.h"
#include "csl_irq.h"
#include "csl_mcbsp.h"
#include "dsk5510.h"
#include <math.h>
#include <stdio.h>

#include "DAC8831_5510cfg.h"

volatile Uint16 k;=20

void main() {
=09
	Uint16 i=3D2, j;=20
=09
	printf(" %d \n", j);
	MCBSP_start(hMcbsp0, MCBSP_RCV_START | MCBSP_XMIT_START |
MCBSP_SRGR_START| MCBSP_SRGR_FRAMESYNC, 0x300u);
	MCBSP_write(hMcbsp0, i);
	while (!MCBSP_rrdy(hMcbsp0)){
	k =3D MCBSP_read(hMcbsp0);
	printf(" %d \n", k);
	}
}

Please let me know if you have any suggestions or additions I need to
make to read from the buffer.

Thanks,
Sammy

Check Out Industry=92s First Single-Chip, Multi-Format, Real-Time HD Video =
Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm=
6467

=20


(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: Interfacing with MCBSP on the 5510 DSP - Xiang Chao - Jan 10 8:58:55 2008

hMcbsp0 is not a buffer, it's a handle to Mcbsp.
To read the data back, you have to set the port in
loopback mode. Or wire the transmit signals to the 
recive pins.

--- dementedstatus <s...@gmail.com>дµÀ:

> I've been trying to wait for it and I don't think
> the MCBSPs have ever
> returned a 1 for the MCBSP_rrdy(). I actually have a
> question
> regarding which value I'm suppose to wait for from
> the MCBSP_rrdy().
> From the examples I've looked at, I see users use
> "while
> (!MCBSP_rrdy(Mcbsp0))" and then read from the
> buffers, but if
> MCBSP_rrdy()=0, doesn't that mean that the buffers
> are not ready to be
> read? And wouldn't the statements within the while
> loop be reading
> from the buffers when rrdy=0?
> 
> The point of my code is to just write to a buffer,
> hMcbsp0, and read
> back that value from it. The code I have is pasted
> below. 
> 
> I'm not sure if I have everything correctly. The
> MCBSP_Open and
> MCBSP_Config are declared in some other files that
> were generated
> using the cdb file that I have. Within it has the
> config and open
> declarations. It's called through the
> "DAC8831_5510cfg.h."
> 
> /*Declarations*/
> #define BLOCK_SZ 1024 /* size of data buffer */ 
> 
> /* CSL device build option */
> #define    CHIP_5510PG2_2          (1)
> 
> /* Header file */
> #include "csl.h"
> #include "csl_irq.h"
> #include "csl_mcbsp.h"
> #include "dsk5510.h"
> #include <math.h>
> #include <stdio.h> #include "DAC8831_5510cfg.h"
> 
> volatile Uint16 k; 
> 
> void main() {
> 	
> 	Uint16 i=2, j; 
> 	
> 	printf(" %d \n", j);
> 	MCBSP_start(hMcbsp0, MCBSP_RCV_START |
> MCBSP_XMIT_START |
> MCBSP_SRGR_START| MCBSP_SRGR_FRAMESYNC, 0x300u);
> 	MCBSP_write(hMcbsp0, i);
> 	while (!MCBSP_rrdy(hMcbsp0)){
> 	k = MCBSP_read(hMcbsp0);
> 	printf(" %d \n", k);
> 	}
> }
> 
> Please let me know if you have any suggestions or
> additions I need to
> make to read from the buffer.
> 
> Thanks,
> Sammy

Check Out Industry’s First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )