0

Serial1 drops a lot of bytes
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Serial1 drops a lot of bytes

by scramma on Thu May 16, 2019 5:30 pm

I have several Feather MO ATWINC1500 boards, and need to use Serial1 at 57600 baud. I am connecting to an external device that has no handshaking available. There is very little code overhead; I'm just transmitting/receivng using a TCP/IP client (or Telnet) and immediately transmitting/receiving to Serial1. About 40-50% of the bytes are dropped. Is Serial1 (tx / rx) a true hardware uart, or does the compiler implement a software (bit-bang) serial port? In any event, can you suggest a strategy that overcomes this problem? Thanks.

scramma
 
Posts: 11
Joined: Fri Apr 07, 2017 11:25 am

Re: Serial1 drops a lot of bytes

by scramma on Thu Jun 06, 2019 1:17 pm

Since there doesn't appear to be a solution for this, it would appear that the Feather MO ATWINC1500 has some fundamental problems, and is not really a working product.

scramma
 
Posts: 11
Joined: Fri Apr 07, 2017 11:25 am

Re: Serial1 drops a lot of bytes

by adafruit_support_carter on Thu Jun 06, 2019 1:39 pm

Serial1 on the TX/RX pins is a hardware UART:
https://learn.adafruit.com/adafruit-fea ... c-pins-2-9

If you only exercise the UART with some simple test sketch, do you see data being dropped?

adafruit_support_carter
 
Posts: 11467
Joined: Tue Nov 29, 2016 2:45 pm

Re: Serial1 drops a lot of bytes

by scramma on Fri Jun 14, 2019 4:17 pm

Yes, I am using a simple sketch, as mentioned in my original query. I read bytes from the HW serial port:

while (Serial.available()) {
char d = Serial.read();
client.write(d);
}

I need to transfer 22000 bytes, with no handshaking, and experiencing massive data loss. I tried setting a larger ring buffer, but that is limited by the internal ram of the Feather MO ATWINC--not enough for the 22000 bytes.

I ended up purchasing the ESP32 Huzzah from you, since it has much more RAM, and just declared a large buffer. That works OK.

Thanks for the reply. I have another question, but will start a new thread.

scramma
 
Posts: 11
Joined: Fri Apr 07, 2017 11:25 am

Please be positive and constructive with your questions and comments.