dear sir,
i am using K60 Tower board.i have uart communication both transmitting packets and receiving packets.
i coded for receving packet using dma with interrupt.I use channel 0 in dma0.receving packet comes in milli second
i have to transmit some bytes before i get receiving bytes.To ensure to get right packet bytes i use printf function.but the problem is that when i use printf function transmitting packet never goes.because may be crash with receiving packet.that i dont know when i remove printf working ok...but if the delay or some additional tasks that problem may be repeat.
how can i remove the problem
if i use dma for transmitting uart packets without interrupt,can i remove the problem
if i use two dma ,can use dma1 with channel 1?
actually i dont know when two dma with channel
tell me what i have to care when selecting two DMA....?
please
Hi,
How are you transmitting the data, are you using polling or interrupt mode?
You need to ensure that the DMA requests are not enabled for transmission, this can cause a problem with the interaction between the core and the DMA engine. As I see the problem is that.The printf will work as a delay, because it takes a lot of time (I measured 10 ms at 21 MHz core frequency).
Please refer to this document and the example code for UART and DMA to check how the DMA is configured.
Using the DMA module in Kinetis Devices
Hope this information can help you
Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------