Hi friends,
My question is aboutusing DMA for usart transmit buffer. I checked some examples for that. Some of them use timer as DMA trigger, some of them use software trigger. My question is I have an idea about DMA usage and I dont even know if it is exist or not. Can you please tell me how I can aply this idea on DMA. Here is the idea:
For example I prepared a buffer for send on uart. I have a function called "send_uart" my program get in this function and make a software trigger for DMA. Please assume I already inited my DMA cahennel number, addresses ..vb. In my "send uart" function, I set size of buffer and I give a software trigger( DMA0CTL |= DMAREQ) for DMA. And the program counter get out of the function and DMA all handle about the sending buffer.
I tried this methode but I failed cos I think DMA writes datas on TXBUF of my UART event it is not ready for it. I can not send all of my datas just some.
Can anyone tell me what I should to do for this methode.? Notice that, I dont wanna use any timer for trig my DMA.
Thanks.