I'm using MSP430F5529 launchpad and trying to receive a byte using the DMA UART. My initialization codes are void uart_init(){ P3SEL |= BIT3 | BIT4 ; // 3 and 4 pin selected for peripheral operation UCA0CTL1 |= UCSWRST; UCA0CTL1 |= UCSSEL__ACLK; // ACLK+ uart in reset mode UCA0BR0 =3; // baud rate 9600; UCA0MCTL =UCBRS_3+UCBRF_0; // UCBRS0=3; UCA0CTL1 &=~UCSWRST; // enable UART } void DMA_init(){ DMACTL0=DMA0TSEL_16; DMA0CTL |=( DMADT_0 | DMADSTBYTE | DMASRCBYTE | DMAIE | DMALEVEL | DMADT_4 | DMAREQ); DMA0SA =UCA0RXBUF; DMA0DA =flag_ex; DMA0SZ =0x0001; DMA0CTL |=DMAEN; } my DMA ISR code is #pragma vector=DMA_VECTOR __interrupt void DMA_ISR() { uart_putc(flag_ex); DMA0CTL &=~DMAIFG; } In the DMA interrupt service routine I'm trying to print the received value but there is nothing received by the "flag_ex", someone please help me to understand the problem.
↧