Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: UART reception with DMA

$
0
0
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.

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>