Atmel SAML21 : Limited USART Rx_buffer

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HI everybody, I have an Atmel SAML21J18A board, that I am trying to make communicate with the Arduino, with the SERCOM USART module. The thing is that it works perfectly, but when I try to transmit something that is very long, it seems that the buffer has a limit of 256 chars. However, I can't find anything in the documentation that specifies that the buffer has a limit. Do you guys have any idea about that ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd suggest the problem is with the code or with the Arduino. The Arduino only implements a small rxbuffer - probably 256 bytes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for your answer, Kartman, so this is also true for the tx buffer of the arduino ? And concerning the rx buffer of the Atmel, there is no limit ?

Also, we did send more than 256 char messages with the Arduino to our computer via the USB and it did not reproduce the problem. Maybe the Atmel doesn't read as fast as the Arduino sends it ?

 

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You seem to be confusing the hardware buffer in the sercom peripheral as compared with a buffer your software implements. For the Arduino (if we assume an Uno), the hardware buffer is only 1 character. The Arduino infrastructure implements a software buffer. The saml21 sercom has 1 character transmit buffer and two character receive. Anything more is implemented in your code. Thus why I suggest the problem might lie in your code.