In a Computer telephony project based on TMS320DM640 we use both MCBSP1 and MCBSP2 to transmit and receive byte wide data to and from ST-BUS.
ST-BUS is a Multichannel TDM bus which transmits and receives serial data. each frame of this bus consists of 32 channel and frames are separated by using frame sync signal.
MCBSP1 uses both transmit and receive paths but MCBSP2 just uses transmit path of data.
Both MCBSPs are configured to use EDMA to transmit and receive data. Thus ping pong structure is used.
Lengh of each EDMA buffer is 7680 bytes (240 bytes for each of 32 channel ) and all buffers are configured to be in Internal memory.
DSP/BIOS is used in this project and all EDMA interrupts are assigned to INT_8 which calls _EDMA_intDispatcher (Dispatcher is active).
In DSP/BIOS, INT_8 is configured in a way that it only mask itself from occurring again (interrupt mask = self)
there is no problem with TCC and receiving interrupts and all 3 channels work properly.
But problem :
I send some signaling data in 17th time slot of MCBSP2 based of EDMA. but rarely I find that 2 or 3 bytes of ping buffer are transmitted between pong buffer and vice versa.
I fill ping buffer with 0xCD and pong buffer with 0xED and activate program but some time in my monitor program which is a PC based application, I see ping buffer like this:
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ED ED CD CD CD CD
2 or 3 number of ED bytes from pong data visited in ping data and vice versa , EDs occur at random places and I have no idea how it could happen.
Program is big and I have to use external SDRAM and caching mechanism. but as mentioned earlier, all EDMA buffers are inside internal memory.
I use CCS 3.3 for this project.
Looking to hearing from you