[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paparazzi-devel] Flashing luftboot
From: |
Sergey Krukowski |
Subject: |
Re: [Paparazzi-devel] Flashing luftboot |
Date: |
Sun, 11 Nov 2012 11:35:51 +0100 |
User-agent: |
Opera Mail/11.61 (Win32) |
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