paparazzi-devel
[Top][All Lists]
Advanced

[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: Felix Ruess
Subject: Re: [Paparazzi-devel] Problem with ADC-6 with Lisa M 2 similar configuration
Date: Fri, 5 Sep 2014 23:41:15 +0200

Hi Julien,

I think I found a bug in when using multiple AD converters, proposed fix: https://github.com/paparazzi/paparazzi/pull/822
Could you plz test with that and report back?

Cheers, Felix


On Tue, Sep 2, 2014 at 11:32 AM, Felix Ruess <address@hidden> wrote:
Hi Julien,

That sounds strance...
First please make sure that if you updated to v5.2 in git that you did a make clean && make and the libopencm3 submodule is updated correctly (that should be done on make, unless you made changes in sw/ext/libopencm3 yourself that would otherwise be overwritten).

Since you said that you modified the LisaM according to your needs, I assume you also removed the LED_3 to use ADC_6 as documented on the wiki?

I also added a check to the lisa_m board file so that it will error if you try to use ADC_4 or ADC_6 with the respective LED on that pin.

Please also note that you can enable the "print config at build time" check box in the paparazzi center before compiling your airframe and you will get more detailed information (e.g. also about which ADCs are enabled).

Cheers, Felix


On Mon, Sep 1, 2014 at 11:02 PM, Julien Huot <address@hidden> wrote:
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"/>
    </subsystem>

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 ?

Julien

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_PORT GPIOC
#define ADC_6_GPIO_PIN GPIO2
#endif

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 ?

Julien







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:
Hi,

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

Julien



--
View this message in context: http://lists.paparazziuav.org/Problem-with-ADC-6-with-Lisa-M-2-similar-configuration-tp16064.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.

_______________________________________________
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




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