DSPRelated.com
Forums

DMA Tx & McBSP in Slave mode

Started by AminRezaie June 26, 2006
Hi All
I used C5502 and want to make McBSP works in Slave mode and My codec is master.I program my codec from microcontroller and I can check read and write to McBSP1 with this command:

while(1)
{
while (!MCBSP_rrdy(h1));
A=MCBSP_read32(h1);
MCBSP_write32(h1, A);
while (!MCBSP_xrdy(h1));

}

Now my McBSP1 worked.

but when I start DMA I have any Tx or Rx interrupt.
I configured my McBSP1 and DMA channels like this:

MCBSP_configArgs(h1,
0x4000, /* Serial Port Control Register 1 */
0x0000, /* Serial Port Control Register 2 */
0x00a0, /* Receive Control Register 1 */
0x80a4, /* Receive Control Register 2 */
0x00a0, /* Transmit Control Register 1 */
0x80a4, /* Transmit Control Register 2 */
0x0000,//2e38,/*0x2e1c,*/ /* Sample Rate Generator Register 1 */
0xa000,//A02f, /* Sample Rate Generator Register 2 */ // it was 302f
0x0000, /* Multichannel Control Register 1 */
0x0000, /* Multichannel Control Register 2 */
0x0080, /* Pin Control Register */ // it was 0x0e0f
0x0000, /* Receive Channel Enable Register Partition A */
0x0000, /* Receive Channel Enable Register Partition B */
0x0000, /* Receive Channel Enable Register Partition C */
0x0000, /* Receive Channel Enable Register Partition D */
0x0000, /* Receive Channel Enable Register Partition E */
0x0000, /* Receive Channel Enable Register Partition F */
0x0000, /* Receive Channel Enable Register Partition G */
0x0000, /* Receive Channel Enable Register Partition H */
0x0000, /* Transmit Channel Enable Register Partition A */
0x0000, /* Transmit Channel Enable Register Partition B */
0x0000, /* Transmit Channel Enable Register Partition C */
0x0000, /* Transmit Channel Enable Register Partition D */
0x0000, /* Transmit Channel Enable Register Partition E */
0x0000, /* Transmit Channel Enable Register Partition F */
0x0000, /* Transmit Channel Enable Register Partition G */
0x0000);

DMA_configArgs(hDmaRcv,
0x000E,//DST EMIF//0x000e,//0x000e,// (CSDP) //
0x4325,//0x4b25,// (CCR) //
0x0020,//0x00a0 ,// I(CICR) //
(DMA_AdrPtr)0x5800,//0x5800,//0x5802, // (CSSA_L)-
0x0000, // (CSSA_U) - Numeric(Byte Address) //
(DMA_AdrPtr)&gBufferRcvPing,// (CDSA_L) - Symbolic(Byte Address) //
NULL, // (CDSA_U) - Symbolic(Byte Address) //
0x0001, // Element Number (CEN) //
0x0040, // Frame Number (CFN) //
0x0000, // Frame Index (CFI) //
0x0000, // Element Index (CEI)
0x0000, // CDFI
0x0000 // CDEI
);

DMA_configArgs(hDmaXmt,
0x0602, //0x0602// Source Destination Register (CSDP) //
0x1b46, //single index//0x1b46,//Control Register (CCR) //
0x0024, //0x0020,//0x0024,// Interrupt Control Register (CICR) //
(DMA_AdrPtr)&gBufferXmtPing,// (CSSA_L) - Symbolic(Byte Address) //
NULL, // CSSA_U) - Symbolic(Byte Address) //
(DMA_AdrPtr)0x5804,//0x5806, // (CDSA_L)- Numeric(Byte Address) //
0x0000, // (CDSA_U) - Numeric(Byte Address) //
0x0001, // Element Number (CEN) //
0x0040, // Frame Number (CFN) //
0x0000, // Frame Index (CFI) //
0x0000, // Element Index (CEI) //
0x0000, // CDFI
0x0000); // CDE

Now I hanged and cant do anything.

Has anyone had a similar problem? or can help me to solve this problem?
Amin