HI
now,I am using MSP432 for debugging, I using channel6 for uart tx ,the code is follows:
the question is when I debugging,the dma_1_interrupt() is always in, in the datasheet, that tells when DMA tranmission task is over, the channle is disable, why still input the funtion of dma_1_interrupt()?
with the API function, when i assign DMA ISR to DMA_INT1,The flag is autoclear?
#ifdef ewarm #pragma data_alignment=256 #else #pragma DATA_ALIGN(controlTable, 256) #endif uint8_t controlTable[256]; uint8_t *p_test_uart0 = (uint8_t*)0x20000600; void main(void) { MAP_WDT_A_holdTimer(); //Configuring pins for peripheral/crystal usage and LED for output MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3, GPIO_PRIMARY_MODULE_FUNCTION); CS_setExternalClockSourceFrequency(32000,48000000); MAP_PCM_setCoreVoltageLevel(PCM_VCORE1); CS_startHFXT(false); // Starting LFXT in non-bypass mode without a timeout. CS_startLFXT(false); MAP_CS_initClockSignal(CS_MCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1); MAP_CS_initClockSignal(CS_SMCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_4); euscia3_init(); MAP_DMA_enableModule(); MAP_DMA_setControlBase(controlTable); MAP_DMA_assignChannel(DMA_CH6_EUSCIA3TX); MAP_DMA_setChannelControl(UDMA_PRI_SELECT | DMA_CH6_EUSCIA3TX, UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE | UDMA_ARB_1); MAP_DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH6_EUSCIA3TX, UDMA_MODE_BASIC, (uint32_t *)0x20000600, (void*)UART_getTransmitBufferAddressForDMA(EUSCI_A3_MODULE), 1024); for(i=0;i<1024;i++) { *p_test_uart0++ = i; } MAP_DMA_enableChannel(6); MAP_DMA_assignInterrupt(DMA_INT1, 6); MAP_Interrupt_enableInterrupt(INT_DMA_INT1); MAP_Interrupt_enableMaster(); while(1) { MAP_PCM_gotoLPM0InterruptSafe(); } } void dma_1_interrupt(void) { uint32_t mode=0,i=0; uint8_t *p_test_uart2 = (uint8_t*)0x20000600; dma0++; //DMA->rINT1_SRCCFG.r &= ~DMA_INT1_SRCCFG_EN; //DMA->rINT1_SRCCFG.b.bEN = 0; mode = DMA_getChannelMode(6); }