DMA with Serial USART2 Receive

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am new to ATSAME70.

When I send command of length 12 or higher from my PC software "Hercules Serial Utility" to microcontroller UART2 port, some characters are missing in the microcontroller.

I have ZylSerial .NET component and from C# application when I send the command string then also it misses some characters after around 12 characters.

Interestingly If I use Teraterm and PuTTy then it always receives all the characters correctly.

 

If I send less than around 12 then it receives all the characters correctly. I have tried many different things .e.g. setting baud 9600 instead of 115200.
 

This made me think that the issue could be in my microcontroller serial receive code...may be I need to use DMA.
 

At the moment, I am not using DMA for UART2 receive. The characters length, I am sending from my PC to USART2 is not fixed. Basically when I receive carriage return then it means it is end of the command.

 

If I use DMA, what interrupt I need to set to detect the time to read the DMA destination buffer? Is there any way to detect time to read when carriage return received?

 

Any code to show this will be really helpful.

 

Thank you.