[Top][All Lists]

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

Re: [Paparazzi-devel] Problem with ADC-6 with Lisa M 2 similar configura

From: Julien Huot
Subject: Re: [Paparazzi-devel] Problem with ADC-6 with Lisa M 2 similar configuration
Date: Mon, 01 Sep 2014 17:02:55 -0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0

Hi Félix,

I tested it with the v5.2, same result.

And I desactivate the GPS_LED as you suggest, same result (do not work).

But I found something very strange

When I use theses configurations :

    <!-- Infrared -->
    <subsystem name="ahrs" type="infrared">
       <configure name="ADC_IR1" value="ADC_2"/>
       <configure name="ADC_IR2" value="ADC_3"/>
       <configure name="ADC_IR_TOP" value="ADC_6"/>
       <configure name="ADC_IR_NB_SAMPLES" value="16"/>

In "message", the IR1 seems uncontrolled  (-512 (512 is my average) )
                         the IR2 is controlled by the ADC 2 (channel 10)
                           the IR Top is controlled by ADC 3 (channel 11)

When I use
       <configure name="ADC_IR1" value="ADC_2"/>
       <configure name="ADC_IR2" value="ADC_6"/>
       <configure name="ADC_IR_TOP" value="ADC_3"/>

In "message" IR1 is still uncontrolled (-512)
                        IR2 is controlled by ADC_3(channel11)
                            TOP is controlled by ADC_2(channel10)

The configuration system seems not properly work.  What do you think ?


Le 2014-09-01 16:07, Felix Ruess a écrit :
Hi Julien,

I would really recommend to use v5.2 since it has a lot of bugfixes since v5.0

And yes, you are right, you need to disable LED_3:
<define name="USE_LED_3" value="0"/>
and assign a different otherwise unused led to GPS_LED or disable it:
<configure name="GPS_LED" value="none"/>

Cheers, Felix

On Mon, Sep 1, 2014 at 9:59 PM, Julien Huot <address@hidden> wrote:
Thank you for your answer Felix !

I use paparazzi 5, the up to date version of 1 month ago. Also, I tested the same code in a "real" lisa m 2 autopilot, and the problem is still the same.

Yes, the "USE_ADC_6" is in the good section. In fact, I know it's enter in the definition of ADC_6 in lisa_m_common.h line 195 (I put a flag) :

#if USE_ADC_6
#warning FLAG: ADC_6 in use
#define AD2_2_CHANNEL 12
#define ADC_6 AD2_2
#define ADC_6_GPIO_PIN GPIO2

And when I "print config at build time" I get :

" arch/stm32/mcu_periph/adc_arch.c:249:3: note: #pragma message: Config: Info: Using ADC_6 "

Do we have do desactivate the LED_3 to use ADC_6 ? Does the configuration for LED_3 and ADC_6 can enter in conflict ?


Le 2014-09-01 15:32, Felix Ruess a écrit :
Hi Julien,

what paparazzi version are you using?
Where did you define USE_ADC_6?
It should be a <define name="USE_ADC_6"/> in your firmware section and not under a normal section so it will end up as a global/cmdline define instead of only in the generated airframe file.

Cheers, Felix

On Mon, Sep 1, 2014 at 8:54 PM, huotj <address@hidden> wrote:

I try to use IR on a Lisa M 2 similar configuration. What I mean with
similar configuration is we took the lisa m 2 and slightly modified it for
better input protection and a bit of customisation.

I use the PC0(ADC2) / PC1(ADC3) / PC2(ADC6) for IR1, IR2 and IRTOP. There is
no problem with the ADC2 and 3, but it only read 0 at the ADC6. Directly on
the microchip pin (pc2), there is 3.3 volt and it still read 0.

I declared the variable : USE_ADC_6.

Any idea ?

Thank you


View this message in context:
Sent from the paparazzi-devel mailing list archive at

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

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