Serial output slows down steering

42 views
Skip to first unread message

John

unread,
Sep 4, 2012, 4:16:20 PM9/4/12
to uavdevboard
Hi,
yesterday I tried out my openLog, set serial output format to udb, and
I noticed hat there was quite a delay in the output,observed at the
servos, sometimes more or less.
In flight I did notice some glitches, which was obviousely due to
servos responding late.
Is this normal? Can it be minimized?
Thanks John

Peter Hollands

unread,
Sep 4, 2012, 4:19:05 PM9/4/12
to uavde...@googlegroups.com
John,

Did you capture / record  the telemetry ? If so, it would be helpful to know the CPU usage during your flight.

Best wishes, Pete



--
--



William Premerlani

unread,
Sep 4, 2012, 8:12:40 PM9/4/12
to uavde...@googlegroups.com
John,
There is a known issue with certain combinations of versions of MatrixPilot and MPLAB. The work around is to use a relatively new version of MatrixPilot, which includes an option that informs MPLAB to use the "legacy" version of the print routine used by the serial output.
Which versions of MatrixPilot and MPLAB are you using?
Best regards,
Bill


--
--



John

unread,
Sep 5, 2012, 3:11:02 AM9/5/12
to uavdevboard
The Matrix version I used is 2.5.1, running on uav db2 board.
I already soldered udb4 together, and will then be using version 3.
Thanks for the explanation,

clemens

unread,
Sep 5, 2012, 5:27:15 AM9/5/12
to uavde...@googlegroups.com
John,
 
what is your transmission rate 9600, 19200, ... 57600 or higher.
The UDB_Extra Format is very long (up to 350 Character) and the length is not constant. The lenght depends from the configuration in options.h and what the actual state of the Matrixpilot is.
So ... the framerate for the Matrixpilot is 25 msec.
To send 350 chars *10 (one start and one stop) there are 3500 bits per second. So the max chars at 19200 baud are 480 ... if you use the whole twell (.025 sec). Assuming that other tasks need cpu power too (GPS, DCM, NAV, etc) I guess that the 350 chars at 19200 bauds are really the limit. But I think Bill can tell more about these relations. So I use the 57600 to save cpu power.
 
regards, Clemens

William Premerlani

unread,
Sep 5, 2012, 7:06:30 PM9/5/12
to uavde...@googlegroups.com
Hi John,
Although you did not say, I assume that you are using a relatively new version of MPLAB. Since you are using an older version of MatrixPilot, the most likely (almost 99.9% certainty) cause of the glitching that you are seeing is the result of a change that Microchip made in one of their library routines, one that is used to format the serial telemetry. In that case, the solution is rather easy: you need to pass the options -legacy-libc to the linker. This will instruct the linker to use the older, "legacy" library.
Attached is a snapshot of the relevant tab in the project build options menu.
Best regards,
Bill Premerlani

--
--



legacyOption.JPG
Reply all
Reply to author
Forward
0 new messages