[Top][All Lists]

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

Re: [Paparazzi-devel] Lisa M v2 Barometer (MS5611) on pprz 4.2

From: ustuav
Subject: Re: [Paparazzi-devel] Lisa M v2 Barometer (MS5611) on pprz 4.2
Date: Tue, 26 Mar 2013 17:07:56 -0500

Just checking up.  Does anyone know what is going on.

On Fri, Mar 22, 2013 at 3:44 PM, ustuav <address@hidden> wrote:
Here's my setup:

Airframe file:
    <load name="baro_ms5611_i2c.xml">
      <define name="SENSOR_SYNC_SEND"/>

  <message name="BARO_MS5611" id="116">
    <field name="d1"       type="uint32"/>
    <field name="d2"       type="uint32"/>
    <field name="pressure" type="float" unit="hPa" format="%.2f"/>
    <field name="temp"     type="float" unit="deg_celsius" format="%.2f"/>

  <message name="MS5611_COEFF" id="117">
    <field name="c0" type="uint16"/>
    <field name="c1" type="uint16"/>
    <field name="c2" type="uint16"/>
    <field name="c3" type="uint16"/>
    <field name="c4" type="uint16"/>
    <field name="c5" type="uint16"/>
    <field name="c6" type="uint16"/>
    <field name="c7" type="uint16"/>

Telemetry file: (Adding this caused errors.  But I figure it's not sending messages back because I didn't define this before)
<message name="BARO_MS5611"         period="1"/>

The end of the build messages after altering my telemetry file:
firmwares/fixedwing/main_ap.c:422:1: warning: implicit declaration of function 'PERIODIC_SEND_BARO_MS5611' [-Wimplicit-function-declaration]
firmwares/fixedwing/main_ap.c:422:1: warning: nested extern declaration of 'PERIODIC_SEND_BARO_MS5611' [-Wnested-externs]
firmwares/fixedwing/main_ap.c:422:1: error: 'PprzTransport' undeclared (first use in this function)
firmwares/fixedwing/main_ap.c:422:1: note: each undeclared identifier is reported only once for each function it appears in
firmwares/fixedwing/main_ap.c:422:1: error: 'UART2' undeclared (first use in this function)
make[1]: *** [/home/uav/Desktop/paparazzi/var/UST_AC/ap/firmwares/fixedwing/main_ap.o] Error 1

On Wed, Mar 20, 2013 at 10:24 AM, Felix Ruess <address@hidden> wrote:

well... what exactly did you configure? The baro_ms5611_i2c module only reads the sensor and nothing more...
If you want to send a BARO_MS5611 message with the values down, <define name="SENSOR_SYNC_SEND"/>
If you want to use it for altitude estimation in the autopilot: <define name="USE_BARO_MS5611"/>

Cheers, Felix

On Mon, Mar 18, 2013 at 12:10 AM, ustuav <address@hidden> wrote:
Thanks Felix!
I configured everything to use i2c2 and got it to build with no errors! :)

I still have a problem though.  I am not getting any barometer messages back.  Any ideas?  I do have it set to use raw sensors.


On Wed, Mar 13, 2013 at 4:29 PM, Felix Ruess <address@hidden> wrote:

The STM32(F1) doesn't have an i2c0, (but i2c1 and i2c2). Aspirin (and hence the baro) is connected to i2c2.
You can take a look at the schematics on

Cheers, Felix

On Wed, Mar 13, 2013 at 9:55 PM, ustuav <address@hidden> wrote:
Hi everyone,

There's another problem.
I have the new version of paparazzi 4.2.
Now I am getting the following errors:

/home/uav/Desktop/paparazzi/var/UST_AC/ap/mcu_periph/i2c.o: In function `i2c0_init':
/home/uav/Desktop/paparazzi/sw/airborne/mcu_periph/i2c.c:9: undefined reference to `i2c0_hw_init'
collect2: ld returned 1 exit status
make[1]: *** [/home/uav/Desktop/paparazzi/var/UST_AC/ap/ap.elf] Error 1
make[1]: Leaving directory `/home/uav/Desktop/paparazzi/sw/airborne'
make: *** [ap.compile] Error 2
make: Leaving directory `/home/uav/Desktop/paparazzi'

I followed the errors and found this out:
The i2c.c file includes the header i2c.h.  The i2c.h file includes the i2c_arch.h file.
The i2c_arch.h file doesn't exist in that directory.

Since the Lisa is an STM32 architecture I did a search for the i2c_arch.h file and found the STM32 version.  Inside that file there is no i2c0_hw_init definition.  There is only i2c1_hw_init and i2c2_hw_init.

Looking through the code, I'm assuming the barometer is on i2c0 and that I shouldn't change the code to try and use i2c1 or i2c2.

Does anyone know what files are missing to get this to build?

the UST-UAV team

On Sun, Mar 10, 2013 at 9:39 PM, ustuav <address@hidden> wrote:
Hi Martin.  Thanks for the reply! Also, thank you for committing the new changes to the ms5611 driver.  I will be in the lab tomorrow to verify that it works.  Thanks again!

On Sat, Mar 9, 2013 at 4:27 PM, Martin Mueller <address@hidden> wrote:

I'm trying to get the Barometer (MS5611) from the Aspirin 2.1 to work
with Paparazzi 4.2.

What I've tried:
* Adding the module "baro_ms5611_i2c.xml" to my airframe file.
     -- this gave me errors such as 'i2c0' undeclared and 'ground_alt'
* After getting that error I added <define name="I2C0" /> to my airframe
     -- that got rid of the first error but I still get the ground_alt
undeclared error.
* I also tried adding the I2C sub-module but that didn't do anything.

Has anyone been able to get the Aspirin 2.1 onboard barometer to work?
I really don't want to upgrade to the master branch.

The nav.h was missing for ground_alt in the ms5611 driver, added that to v4.2. Also changed the default I2C address to match a low CSB\ as most boards (Aspirin2.1, FreeIMU 0.4.3, ...) have that pin low.

You add i2c0 by having USE_I2C0 in your airframe file.

<target name="ap" board="<your_board_type>">
      <define name="USE_I2C0"/>


Paparazzi-devel mailing list

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]