Part Number: MSP432P4111
I'm currently sharing DMA channel 2 between an I2C port and a UART port, because I can't get the I2C port to map to another DMA channel.
Based on what I see in dma.h of the DriverLib, I'm constrained in my mappings for EUSCIB1 to channels 0, 2, 4, or 6, but channels 0 and 2 are already being used by other peripherals, and I cannot get channels 4 or 6 to work for some reason.
The following is the code to initiate the DMA transfer:
DMA_assignChannel(I2C_TX_DMA_ASSNMT);
DMA_setChannelControl(UDMA_PRI_SELECT | I2C_TX_DMA_ASSNMT, UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE | UDMA_ARB_1);
DMA_setChannelTransfer(UDMA_PRI_SELECT | I2C_TX_DMA_ASSNMT, UDMA_MODE_BASIC, PTxData, (void*) I2C_TX_DMA_BUF_ADDR, TXByteCtr);
DMA_assignInterrupt(I2C_TX_DMA_INT, I2C_TX_DMA_CH);
DMA_enableInterrupt(I2C_TX_DMA_INT);
Interrupt_enableInterrupt(I2C_TX_DMA_INT);
DMA_enableChannel(I2C_TX_DMA_CH);
I2C_masterSendStart(I2C_BASE_ADDR);
I've created the following constants so I have flexibility in mapping the DMA channels:
I2C_TX_DMA_CH = DMA_CHANNEL_2
I2C_TX_DMA_ASSNMT = CMA_CH2_EUSCIB1TX0
I2C_TX_DMA_INT = DMA_INT3
When I change the DMA channel to DMA_CHANNEL_4 and the assignment to DMA_CH4_EUSCIB1TX1 it doesn't work, nor does it work when I change it to DMA_CHANNEL_6 and the assignment parameter to DMA_CH6_EUSCIB1TX2.
Any ideas as to why the assignments for channel 4 and channel 6 don't work?
Thanks.