HTCC-AB02S. Serial port 1 loses GPS data packets if you send data through port 0

I try to send something on Serial 0 at the same time to receiving GPS data from Serial1. But Serial1 lose some bytes. I maked this test project to show this problem https://github.com/Genajoin/cubecellGpsSerialTest/blob/main/src/main.cpp

Programm printing “0” to Serial0 and at the same time checking recieved nmea checksum data. If it ok is printing “1”. Else printing “error”.

Programm protocol:

Write something to Serial0.
0000000000000000000000000000000000000000000000000
0000000000000000000000000000000
ERROR 49<>0 $GNGGA,,01
0000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000
ERROR D<>0 $GNGGA,,0,00,25.,,,,,,,,SV,1,1,0E
000000000000000000000000000000000000000000000000000000000000
000000000000000000000
Silent mode to Serial0.
111111111111111111111111111111
Write something to Serial0.
00000000000000000000000000000000000000000000000000
ERROR 2A<>7A $GNGGA,,,N*7A

I think it is buffer problem. How to increase serial rx buffer size?

This itself cannot be done at the same time, you need to receive the data from serial port 1 first, and then use serial port 0 to send it.

You can send and receive on different ports at the same time. The problem is that the size of the receive buffer is only 8 bytes. And if you do not have time to read it in time (for example, a software operation takes more than 5 ms), then the data in the buffer is replaced by new ones.

Look at 61 line in my programm.

The one you mentioned is a register, and there should be no way to change its size.