DSPRelated.com
Forums

Re: FW: DMA/McBSP issue

Started by Unknown September 13, 2001

GBenga, I finally have my system working at the lowest level. Although there were modest reference to some of my troubles in the documentation. They were brief and since the docs are all preliminary, hard to find if you know what you are looking. TI tech support was helpful, although very overloaded.

I have attached the C file generated by the CSL for the C5510. It shows the settings I used to get the setup completed. My biggest problem was understanding that the CSL does not start the DMA even though it allows you to set an enable bit and if you run to Main() you can see the DMA's enabled. You will find that they are immediately disabled. If you are wanting to do double indexing you will find an interest little issue in the formula that is provided. It's wrong. Here are the formula for calculating the Frame Index and the Element index.
These are the values that you enter in the dialog box (frame tab) of the CSL->DMA->DMA CFG Mngr->DmaCfgx.
CFN = 4, CEN = 10, 16 bit data        (these will differ if your data size differs...I presume )
Frame index = (-1)(((( CEN-1)(CFN) - 1) x 2) + 1) = -71
Element index = (CFN x 2) - 1 = 7

These value make the data line up nicely and do NOT over flow into the next buffer.
Note: When you enter -71 into the CFI field, the compiler will give you a truncation warning, which can be ignored.

I started by looking at one frame and lining it up. I saw what it was doing and it was different than any formula I'd seen. When I added a second frame I could clearly see that what I was putting into the element index needex to be one less than I thought.

I've also attached my sample.c file that shows the start process after BOIS inits the hardware. All I'm doing in the IRQ routine is to take the samples in(DR is pulled high) mask them so I can tell  where they come from and put them back into the buffer on the Tx side.

If you are using DSP/BIOS and the CSL, this may be of some assistance to you.....

It's not commented very well, so if you have any questions, just ask.....

Good luck

Perry Howell
Lead Design Engineer
Vega Signaling Products
Telex Communications, Inc
8601 East Cornhusker Hiway
Lincoln NE, 68507-9702
402-465-6621
402-467-4003(fax)
G...@tellabs.com

09/13/2001 01:05 PM

       
        To:        p...@telex.com
        cc:        
        Fax to:        
        Subject:        FW: [c55x] DMA/McBSP issue
Perry,

Hello.A co-worker forwarded the message below you posted to the c55x
discussion group. I am having more or less the same problem. I'm only
using one McBSP though and two DMA channels, one for RX and another for
TX.The McBSP is working fine cause no only do I see data show up in the
DRR when I manually write a word to the DXR, plugging in a scope shows
that the McBSP is continuously pumping out whatever is in the DXR. As
you mentioned in your post, absolutely no DMA xfers are occurring
however unlike your situation, I am getting RX interrupts, no TX
interrupts though. These interrupts however are not triggered by the end
of BLOCK or FRAME xfers, they are triggered by the TIMEOUT event. This
signifies that for whatever reason, the DMA is not receiving McBSP TX/RX
events. There may be other reasons, who knows. I'm currently
investigating this problem but would appreciate any "leads" or definite
fixes you may come upon in resolving this problem. If I figure anything
out I'll let you know as well.

-Gbenga

Original Message-----
From: Green, Chris
Sent: Thursday, September 13, 2001 9:41 AM
To: Olowoyeye, Gbenga /Netwk Tech Grp /USA, Massachusetts, Bedford
Subject: FW: [c55x] DMA/McBSP issue
-----Original Message-----
From: p...@telex.com [mailto:p...@telex.com]
Sent: Monday, September 10, 2001 5:44 PM
To: c...@yahoogroups.com
Cc: p...@telex.com
Subject: [c55x] DMA/McBSP issue

Fellow C5510 users. I'm having trouble getting the DMA's to work in
conjunction with the McBSP's.
Here is what I'm doing. I'm using all the McBSP's and DMA's to transfer
samples in and out of the McBSP's, each McBSP is connected to 4 stereo
codec so there are 10 active channels (if the codec control channels are
counted) on each McBSP. Each McBSP is assigned a pair of DMA channels.

I'm using the Chip Support Library(CSL) to setup/init the hardware. It
seems to be doing what I ask of it.

On the DMA's I'm using double indexing for the source(TX) and
destination(RX) and constant on the other side of each. I'm buffering 4
samples from each audio channel, so the buffers for RXping is 40 words
or 80bytes.

I'm using macro's in the TI library to start the DMA's and McBSP's. The
CSL function initializes the hardware and I just have to start it by the
macro calls.
DMA_start = DMA_FSET_H = _PFIELD_SET are the macros that I use to enable
each DMA.

I see this work. It enables the DMA and waits for the McBSP to be
enabled. Here is the problem. Once the McBSP is started, the DMA
immediately disables. I don't get an interrupt, I don't see the drop
event occur. I do see the RRDY and RFULL get set as is expected, but
basically is appears that the DMA shuts off after the first element is
received. Secondly, no transfer occurs. The buffer that should hold the
first element has nothing. The address in DMA_CSSA 0x0C04 is correct.

In the errata, Advisory DMA_1 mentions something very close to this, but
I don't see a drop event so I can't tell if it is the same.

I know this may be asking alot, but if there is someone who has seen
this before, please drop me a line.

Using CCS2.0 Spectrum Digital SPI515 emulator V1.2 silicon.

If there is anyone that can assist me in this regard, I would be very
grateful.

Perry Howell
Lead Design Engineer
Vega Signaling Products
Telex Communications, Inc
8601 East Cornhusker Hiway
Lincoln NE, 68507-9702
402-465-6621
402-467-4003(fax)

Attachment (not stored)
BDY.RTF
Type: application/rtf

Attachment (not stored)
c6200dspcfg_c.c
Type: application/octet-stream

Attachment (not stored)
c6200dspcfg.h
Type: application/octet-stream

Attachment (not stored)
sample.c
Type: application/octet-stream