MSP432P401R开发板,DMA串口接收中断,当配置为
DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH5_EUSCIA2RX,
UDMA_MODE_BASIC,
(void*)UART_getReceiveBufferAddressForDMA(EUSCI_A2_BASE), &recData,
1);
也就是接收一个数据时能触发中断,而如果配置为
uint8_t recBuffer[1024];
DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH5_EUSCIA2RX,
UDMA_MODE_BASIC,
(void*)UART_getReceiveBufferAddressForDMA(EUSCI_A2_BASE),recBuffer,
1024);
就无法触发中断。这是为什么?怎么解决?
灰小子:
这个函数的原型是void DMA_setChannelTransfer(uint32_t channelStructIndex, uint32_t mode, void *srcAddr, void *dstAddr, uint32_t transferSize);
倒数第二个参数是void *类型