David, I will need to go back into the API and try to understand why the first set might be repeated. One thing to be careful of is that the TX trigger happens after the data is moved from the buffer into the shift register while the RX trigger happens after the data has been shifted in (and the TX shifted out). It is possible that you are entering the ISR and writing to the DMA registers while the RX is still being performed. It may be more intuitive if the ISR is based upon the RX because then you know that the SPI communication is complete. Additionally, I typically do not use the driverlib calls in the ISR for the DMA update. There is some overhead associated with the call and you only really need to update the control register. See the following example: /* Disabling DMA Channel 0 */ MAP_DMA_disableChannel(0); // MAP_DMA_setChannelControl((UDMA_PRI_SELECT | DMA_CH0_TIMERA0CCR0), // UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 | UDMA_ARB_1024); // MAP_DMA_setChannelTransfer((UDMA_PRI_SELECT | DMA_CH0_TIMERA0CCR0), UDMA_MODE_BASIC, (void *)(0x40004C01), // destinationArray, SAMPLE_SIZE); MSP_EXP432P401RLP_DMAControlTable[0].control &= 0xFFFFC000; MSP_EXP432P401RLP_DMAControlTable[0].control |= ((SAMPLE_SIZE-1)<<4) + UDMA_MODE_BASIC; /* Enabling DMA Channel 0 */ MAP_DMA_enableChannel(0); I am still looking into the I2S implementation. Ideally I would like to get rid of the external hardware and do this completely within the MSP432. My concern is trying to stream large amount of I2S without having to continually update the DMA. I hope to have some preliminary examples soon, let me know if you have any codecs you recommend. Regards, Chris
↧