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: Refik Sever
Subject: Re: [Paparazzi-devel] lisa - m upload problem
Date: Thu, 31 Oct 2013 23:30:03 +0200

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: address@hidden [mailto: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


reply via email to

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