voxl-uart-loopback problems
-
Hi,
I run into the problem with voxl-uart-loopback on baud rate (921600) and buffer size >= 500 bytes. many times the loopback returns 0 bytes (on reading part). If i set low baud rate 9600 and 200 bytes of data, its FAIL always on reading. . Please help me . It's not a regular serial,it works with DSP via RPC. So i need to be sure that will not be a problem with data integrity.Thanks. -
Hello,
There were a few issues with the uart loopback example:
- the test buffer size was not handled properly (if test size is larger than HelloWorld strin
- the sleep time was not enough to allow the transfer to happen (the write function is non-blocking, it seems)
I have made some fixes here:
https://gitlab.com/voxl-public/core-libs/libvoxl_io/-/blob/dev/lib/apps/voxl-uart-loopback.cNow the behavior is as shown below.. please try it.
./voxl-uart-loopback -d 7 -b 9600 -s 20
INITIALIZING
Sending 20 bytes:
0123456789:;<=>?@ABC
Transfer should take ~20833us, sleeping for 25833us (+5000us overhead)
Reading back data...
Received 20 bytes:
0123456789:;<=>?@ABC
closing uart bus
PASS
./voxl-uart-loopback -d 7 -b 9600 -s 500
INITIALIZING
Sending 500 bytes:
0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJ
Transfer should take ~520833us, sleeping for 525833us (+5000us overhead)
Reading back data...
Received 500 bytes:
0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:;<=>?@ABCDEFGHIJ
closing uart bus
PASS
Reading along? Create a free ModalAI Forum account to join in.
With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.
Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.
Register Login