• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    voxl-uart-loopback problems

    Ask your questions right here!
    2
    2
    107
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      relevinsky
      last edited by 24 Nov 2021, 10:09

      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.![alt text](b74ee7f1-d647-4e37-9af9-56c26427fb8f-image.png image url) . 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.

      1 Reply Last reply Reply Quote 0
      • A
        Alex Kushleyev ModalAI Team
        last edited by Alex Kushleyev 24 Nov 2021, 22:50 24 Nov 2021, 22:34

        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.c

        Now 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

        1 Reply Last reply Reply Quote 1
        1 out of 2
        • First post
          1/2
          Last post
        Powered by NodeBB | Contributors