Part Number:TMS320C6746
Hello.
I want transfer data through McBSP0 using EDMA0
To start transmission I fill PaRAM entries:
ParamSet[2] (McBSP0 Receive):
OPT = (1 << 20) | (0x02 << 12); // TCC = 2
SRC = 0x01F10000; // BFIFO
LINK = 0xFFFF;
ParamSet[3] (McBSP0 Transmit):
OPT = (1 << 20) | (0x03 << 12); // TCC = 3
DST = 0x01F10000; // BFIFO
LINK = 0xFFFF;
Then I enable DMA events and DMA interrupts:
EDMA3CC_IESR = (1 << 2) | (1 << 3);
EDMA3CC_EESR = (1 << 2) | (1 << 3);
And start McBSP0:
MCBSP_SPCR |= (1 << 22); // GRST
MCBSP_SPCR |= (1 << 16) | (1 << 0); // XRST, RRST
MCBSP_SPCR |= (1 << 23); // FRST
I expext two consecutive interrupts (Tx and Rx), but get only 1 - Tx (IPR = 0x08). Furthemore I also get DMA Error Interrupt with EMR = 0x08;
If I use wrong order of PaRAM entries (2 for Tx and 3 for Rx) then I get both interrupts (IPR = 0x04 first and IPR = 0x08 second) but after it I also get DMA Error with EMR = 0x04;
What I'm doing wrong?
Can I find code samples for this peripheral anywhere?