paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Flashing luftboot


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Flashing luftboot
Date: Sun, 11 Nov 2012 14:15:57 +0100

Hi, 

the ADC2 pin is now a skip bootloader pin: If you tie it to GND, you force the skip of the bootloader.
And as Sergey said, if you changed the code if the ADC2 pin is not pulled to GND, VBUS checking won't work.
Was it also not working before your changes?

From the readme:
At bootup, Luftboot uses several criteria (in this order) to decide whether to jump
to the payload or to initiate the bootloader:
  1.  On boot, if the payload is NOT valid, start the bootloader
  2.  If the flag is set indicating we just downloaded a payload, jump to payload
  3.  If the payload is forcing the bootloader (using GPIO state after core-only reset) start the bootloader
  4.  If the ADC2 pin on Lisa/M is grounded, jump to payload (i.e. "skip bootloader" jumper)
  5.  If voltage is present on the USB vbus, start the bootloader 
  6.  Otherwise, jump to payload

Cheers, Felix


On Sun, Nov 11, 2012 at 11:35 AM, Sergey Krukowski <address@hidden> wrote:

Hallo Mitchell!
Yes, it seems to be a bug here.

if(!gpio_get(GPIOC, GPIO0)) {
        /* If pin grounded, disable the pin bank and return */
        gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, GPIO0);
        rcc_peripheral_disable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPCEN);
        return false;
}
means that the bootloader will not be started if there is a ground connector on ADC2.
And, if you corrected your code like you did and there is no connector on ADC2 the USB VBUS will never be checked and USB forse will not work.

I think, there should be something like this:
if(!gpio_get(GPIOC, GPIO0)) {
        /* If pin grounded, disable the pin bank and return */
        gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, GPIO0);
        rcc_peripheral_disable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPCEN);
        return true;
}

Regards,
Sergey

_______________________________________________
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]