So I setup the DMA channel 0 for 1x 16-bit element data transfer, whenever there is a SPI1 TX DMA request (enabled in the SPI1 module). However I don't see any data transfer after writing an initial 16-bit dummy write to the SPI1DAT1 register. Following is my code, please shed some light as on where should I look for debugging.
DMAGCTRL = 0x00000000; // disable all DMA functions
DMAHWCHENAS = 0x00000001; // channel 0: MibSPI1 TX (Manchester test data stream)
DMADREQASI0_bit.CH0ASI = 0x01; // channel 0: request line #1 from MibSPI1 TX request
DMAPAR0 = 0x70000000; // channel 0: use DMA Port B
DMAGCTRL = 0x00010000; // enable all DMA functions
DMACP0ISADDR = (unsigned long) A708_TEST_MSGS; // set of buffer address of loopback test bits array
DMACP0IDADDR = 0xFFF7F43C; // MibSPI1DAT1 (fix destination) for data TX only
DMACP0ITCOUNT = 0x000C0001; // frame transfer=12, element transfer=1
DMACP0CHCTRL = 0x00005009; // RD/WR size: 16 bits, HW triggers one block transfer
// RD mode: post increment, WR mode: constant
// single block transfer mode
MibSPI1INT0 = 0x00010000; // enable DMA request (no ISR will be triggered)
MibSPI1DAT1 = spi1dat1; // kick off first 16-bit write
I was thinking that the DMA channel 0 will pickup to write additional data to SPIDAT1 ... but this is not the case.
Please help.