Hi All, currently I am trying to get DMA properly configure for SPI RX through the U1DBUF as pointed out in the documentation.
My device is a slave, and I previously had SPI working but can't seem to get the SPI data via DMA. The interrupt is properly received and when I check the array where the bytes should be stored the array has been filled with {0x80, 0x80, 0x80, ....} each time.
Are there any timing requirements, or anything else for enabling DMA with SPI I am just missing?
******************************Here is my DMA Config Code**************************************
dmaConfig0.SRCADDRH = ((uint16)U1DBUF >> 8) & 0x00FF;
dmaConfig0.SRCADDRL = (uint16)U1DBUF & 0x00FF;
dmaConfig0.DESTADDRH = ((uint16)rxBufferSlave >> 8) & 0x00FF;
dmaConfig0.DESTADDRL = (uint16)rxBufferSlave & 0x00FF;
dmaConfig0.VLEN = DMA_VLEN_VALOFFIRST; //Transfer Length based on first byte
dmaConfig0.LENH = (BUFFER_SIZE >> 8) & 0x00FF;
dmaConfig0.LENL = BUFFER_SIZE & 0x00FF;
dmaConfig0.WORDSIZE = DMA_WORDSIZE_BYTE; //Transfers 1 BYTE
dmaConfig0.TMODE = DMA_TMODE_SINGLE_REPEATED; //Transfers 1 BYTE/Trigger & Resets ARM after transfer count is reached
dmaConfig0.TRIG = DMA_TRIG_URX1; //Trigger on SPI RX
dmaConfig0.SRCINC = DMA_SRCINC_0;
dmaConfig0.DESTINC = DMA_DESTINC_1;
dmaConfig0.IRQMASK = DMA_IRQMASK_ENABLE; //Enable DMA ISR
dmaConfig0.M8 = DMA_M8_USE_8_BITS;
dmaConfig0.PRIORITY = DMA_PRI_HIGH; //DMA HIGH PRIORITY
DMA0CFGH = ((uint16)&dmaConfig0 >> 8) & 0x00FF;
DMA0CFGL = (uint16)&dmaConfig0 & 0x00FF;
DMAIRQ &= 0x00;
DMAARM |= (DMAARM_DMAARM0);
NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP(); // 9 NOPs