paparazzi-devel
[Top][All Lists]
Advanced

[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: Mon, 25 Nov 2013 13:07:49 -0700

Hello,

With the current Luftboot bootloader, you can override the USB detection by putting a jumper between ground and the ADC2 pin. This forces the bootloader to start the payload application immediately if there is a valid payload. Perhaps this needs to be revisited. In addition, ADC1 is used at autopilot startup to enter into Spektrum bind mode if using the spektrum rc subsystem.

I am still not sure why you have such trouble with the USB programming. Hopefully some time can be found for the CRC checking on luftboot soon. There are a few changes that need to be made I think.

Thanks,
-Stephen Dwyer


On Sun, Nov 17, 2013 at 11:13 AM, Refik Sever <address@hidden> wrote:

Hello,

 

We are using ADC1, 2 and 3 of Lisa M. When the connector of ADCs is plugged, Lisa M does not enter to bootload.  Boot0 pin is on the analog2 connector, and ADC 1-2-3 are on analog1 connector. Then, why does ADC1-2-3 effect the boot process?

 

Although we disconnect all the connectors, we have problems in the upload. We always try at least 3-4 times and then it completes the upload. But sometimes it does not run successfully, and we re-upload the file.  I hope that the file checking will be added to parapazzi V5 soon.

 

Thanks,

Refik  

 

 

 

 

From: paparazzi-devel-bounces+refiksever=address@hidden [mailto:paparazzi-devel-bounces+refiksever=address@hidden] On Behalf Of Stephen Dwyer
Sent: Saturday, November 2, 2013 7:47 AM
To: address@hidden


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

 

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 stm32_mem.py 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)

 

Thanks,

-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']):

 

 

Regards,

Corentin

 

 


--
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 stm32loader.py to include flash unlock before programming. Ask if you need the patch.

 

Could you please send the patch?

 

Thanks,

Refik

 

 

 

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:

major:

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

 

minor:

-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 stm32loader.py to include flash unlock before programming. Ask if you need the patch.

 

Regards,

Corentin

 

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

 


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

 


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

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