This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: MSP432P401R
Hello community,
I can create the running DMA UART sending. unfortunately for DMA UART RX code doesnt work..
Has anybody working example..
Just a couple of my functions...
void prepareDMA() { MAP_DMA_enableModule(); MAP_DMA_setControlBase(dmaControlTable); /* Assign DMA channel 0 to EUSCI_A0_TX0 */ MAP_DMA_assignChannel(DMA_CH0_EUSCIA0TX); /* Setup the TX transfer characteristics & buffers */ MAP_DMA_setChannelControl(DMA_CH0_EUSCIA0TX | UDMA_PRI_SELECT, UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE | UDMA_ARB_1); MAP_DMA_assignInterrupt(INT_DMA_INT1, DMA_CHANNEL_0); MAP_DMA_disableInterrupt(INT_DMA_INT1); /* Assign DMA channel 1 to EUSCI_A0_RX0 */ MAP_DMA_assignChannel(DMA_CH1_EUSCIA0RX); /* Setup the RX transfer characteristics & buffers */ MAP_DMA_setChannelControl(DMA_CH1_EUSCIA0RX | UDMA_PRI_SELECT, UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 | UDMA_ARB_1); MAP_DMA_assignInterrupt(INT_DMA_INT2, DMA_CHANNEL_1); MAP_DMA_disableInterrupt(INT_DMA_INT2); } void UART_send_dma(char buff[], int n) { MAP_DMA_setChannelTransfer( DMA_CH0_EUSCIA0TX | UDMA_PRI_SELECT, UDMA_MODE_BASIC, buff, (void *) MAP_SPI_getTransmitBufferAddressForDMA(EUSCI_A0_BASE), n); MAP_DMA_enableInterrupt(INT_DMA_INT1); MAP_DMA_enableInterrupt(INT_DMA_ERR); MAP_DMA_enableChannel(DMA_CHANNEL_0 ); } void UART_receive_dma(char buff[], int n) { MAP_DMA_setChannelTransfer( DMA_CH1_EUSCIA0RX | UDMA_PRI_SELECT, UDMA_MODE_BASIC, (void*)MAP_SPI_getReceiveBufferAddressForDMA(EUSCI_A0_BASE), buff, n); MAP_DMA_enableInterrupt(INT_DMA_INT2); MAP_DMA_enableInterrupt(INT_DMA_ERR); MAP_DMA_enableChannel(DMA_CHANNEL_1); } unfortunately after UART_receive_dma() call there is no related interrupt... UART_send_dma() works, every call resulted in interrupt call.. Thanks
>If you have a loop back of some kind..
No, I have not.. the input stream (RX, from my point of view) is generated from independent source.
Just once a second 256 byte UART send.
>If you navigate to the UART portion of the API guide you will also find specific APIs instead of using the SPI APIs.
Thanks, will do it later today.
Back to my question, so from your point of view, my functions are right in coding?
All I have to pay attention is to have inbound UART stream, right?
Okay.
I can run this DMA RX with bare metal code, but cannot run this in TI RTos..
Of course, I know that in TI RTOS there are no irq but hwi's..
Nevertheless, do not have time to investigate it further
Thank you.
let us close the case.
**Attention** This is a public forum