[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] lisa - m upload problem

From: Stephen Dwyer
Subject: Re: [Paparazzi-devel] lisa - m upload problem
Date: Fri, 1 Nov 2013 23:47:22 -0600

Hello Corentin,

I took a quick look at your CRC upload updates - seems very useful!

If you can just create a pull request into paparazzi/master, then it can be merged in as required I think, after any code review/comments/changes.

I did have a few comments:
 - There is a second copy of in Paparazzi itself, and this is the one actually used to upload. It has considerable updates probably not in the luftboot version. (Perhaps you already updated this? Didn't look closely).
 - One of these updates is a sort of progress bar that works with paparazzi center (which is pretty important, should definitely look decent there, as this is where most users use it) since pprz center doesn't support carriage return.
 - The script definitely needs to remain backwards compatible with the non-crc checked version of luftboot...
 - On this note, the version of luftboot should be updated correctly (haven't thought more about this right now)

-Stephen Dwyer

On Fri, Nov 1, 2013 at 2:10 PM, Corentin Chéron (Airinov) <address@hidden> wrote:
Hi Refik,

Sorry for the delay I'm not used to filtering mailing list messages...

The full patch is available here:

Here is the main change: writeUnproted following by a new initChip

@@ -397,8 +401,16 @@ if __name__ == "__main__":
         mdebug(0, "Chip id `%s'" % str(map(lambda c: hex(ord(c)), cmd.cmdGetID())))
 #    cmd.cmdGetVersion()
 #    cmd.cmdGetID()
-#    cmd.cmdReadoutUnprotect()
-#    cmd.cmdWriteUnprotect()
+#        cmd.cmdReadoutUnprotect()
+        cmd.cmdWriteUnprotect()
+        try:
+            cmd.initChip()
+        except:
+            print "Can't init. Ensure that BOOT0 is enabled and reset device"
+        bootversion = cmd.cmdGet()
+        mdebug(0, "Bootloader version %X" % bootversion)
+        mdebug(0, "Chip id `%s'" % str(map(lambda c: hex(ord(c)), cmd.cmdGetID())))
 #    cmd.cmdWriteProtect([0, 1])
         if (conf['write'] or conf['verify']):


Corentin Chéron,
Directeur Technique 
Airinov SAS
06 48 24 49 09

2013/10/31 Refik Sever <address@hidden>

Hi Corentin,


We have made some crashes due to the Lisa upload problem, as I wrote in the beginning of the conversation.  It will be very good for us if your changes are added to the stable v5 branch as well as master branch after testing.


>For installing the new luftboot firmware, I used the serial bootloader as described on the wiki.

>I patched to include flash unlock before programming. Ask if you need the patch.


Could you please send the patch?







From: paparazzi-devel-bounces+refiksever=address@hidden [mailto:paparazzi-devel-bounces+refiksever=address@hidden] On Behalf Of Corentin Chéron
Sent: Tuesday, October 29, 2013 9:21 PM
To: paparazzi-devel
Subject: Re: [Paparazzi-devel] lisa - m upload problem


Hi all,


We have been using Lisa/M and had recently had some upload problems.

I have identified more precisely the cause of the problems:

-USB transfer error


The consequences were the following:

*random memory error undetected during programming procedure

*control message badly formated resulting in a stall, and then a broken pipe.


As a result, we have also experienced random lisa freeze, either just after programming,

or later, when running code with error.


The problem was experienced after increasing the length of the USB cable, by soldering

4 flying wires between lisa and a remote USB connector.

ST DFU documentation states that USB should handle error and thus no further checking

is required.

Apparently some errors are able to go through the USB integrity checks.


One solution could be to use a shielded cable, but I decided to update the bootloader with the help

of Kalory.


I have made some modification to the luftboot host and firmware:


-crc validation of every block of received memory, if error, 5 retries of the block

-crc validation of the whole program memory at the end of upload.



-speed increase (for 12s to 6s on my computer) by tuning the USB pollTimeout

-progress bar, looks nice in a terminal, no so in the paparazzi center.

-return -1 when error, return 0 when ok

-change the usb stall response to a STATUS_ERR response in cas of wrong address (no more

broken pipe)

-if no valid DFU is found, wait displaying dots


I have tested on various lab situations, and been able to program even when receiving 4 or 5

errors during transfer.


The commit is available on the github fork I made:


I will do more testing, but in the meantime, if anyone want to test it, and give some feedback.


For the merge with the paparazzi branch:

-I'm sorry I made only one commit...

-what is the pull request procedure?


For installing the new luftboot firmware, I used the serial bootloader as described on the wiki.

I patched to include flash unlock before programming. Ask if you need the patch.




Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]