paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] barometer ms5611


From: Felix Ruess
Subject: Re: [Paparazzi-devel] barometer ms5611
Date: Sun, 22 Nov 2015 18:58:29 +0100

Hi Cedric,

I think it would be easier (and cleaner) if you don't use baro_board, but instead load the baro_ms5611_spi module.
http://docs.paparazziuav.org/latest/module__baro_ms5611_spi.html

Cheers, Felix

On Sun, Nov 22, 2015 at 4:01 PM, Cédric Marzer <address@hidden> wrote:

>
> Hi all,
> I made a custom board (STM32F4) with the barometer (ms5611) and the MPU (MPU6000) that share the same spi (spi2). It is similar to one of the aspirin configurations.
> My problem is that the MPU is working fine but the barometer doesn't.
> I tried to use it with or without the corresponding module without success.
>
> My changes to the baro_board.makefile are the following :
>
> # imp baro
> else ifeq ($(BOARD), imp)
>  BARO_BOARD_CFLAGS += -DBARO_BOARD=BARO_MS5611_SPI
>  include $(CFG_SHARED)/spi_master.makefile
>  BARO_BOARD_CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE0 -DUSE_SPI_SLAVE1
>  BARO_BOARD_CFLAGS += -DBB_MS5611_SPI_DEV=spi2
>  BARO_BOARD_CFLAGS += -DBB_MS5611_SLAVE_IDX=SPI_SLAVE0
>  BARO_BOARD_SRCS += peripherals/ms5611.c
>  BARO_BOARD_SRCS += peripherals/ms5611_spi.c
>  BARO_BOARD_SRCS += boards/baro_board_ms5611_spi.c
>
> The board C files contains the following lines (I tried with both the USE_BARO_BOARD commented or uncommented) :
>
> /* by default activate onboard baro */
> //#ifndef USE_BARO_BOARD
> //#define USE_BARO_BOARD 1
> //#endif
>
> /* SPI */
> #define SPI2_GPIO_AF GPIO_AF5
> #define SPI2_GPIO_PORT_MISO GPIOB
> #define SPI2_GPIO_MISO GPIO14
> #define SPI2_GPIO_PORT_MOSI GPIOB
> #define SPI2_GPIO_MOSI GPIO15
> #define SPI2_GPIO_PORT_SCK GPIOB
> #define SPI2_GPIO_SCK GPIO13
>
> #define SPI3_GPIO_AF GPIO_AF6
> #define SPI3_GPIO_PORT_MISO GPIOB
> #define SPI3_GPIO_MISO GPIO4
> #define SPI3_GPIO_PORT_MOSI GPIOB
> #define SPI3_GPIO_MOSI GPIO5
> #define SPI3_GPIO_PORT_SCK GPIOB
> #define SPI3_GPIO_SCK GPIO3
>
> #define SPI_SELECT_SLAVE0_PORT GPIOC
> #define SPI_SELECT_SLAVE0_PIN GPIO13
> #define SPI_SELECT_SLAVE1_PORT GPIOB
> #define SPI_SELECT_SLAVE1_PIN GPIO12
> #define SPI_SELECT_SLAVE2_PORT GPIOA
> #define SPI_SELECT_SLAVE2_PIN GPIO15
>
> The imu_imp_V5.makefile contains the following lines :
>
> IMU_IMP_CFLAGS += -DIMP_SPI_SLAVE_IDX=SPI_SLAVE1
> IMU_IMP_CFLAGS += -DIMP_SPI_DEV=spi2
>
> IMU_IMP_CFLAGS += -DUSE_SPI2
> # Slave select configuration
> # SLAVE2 is on PB12 (NSS) (MPU600 CS)
> IMU_IMP_CFLAGS += -DUSE_SPI_SLAVE1
>
> # SLAVE0 is on PC13, which is the baro CS
> IMU_IMP_CFLAGS += -DUSE_SPI_SLAVE0
>
> All this barometer stuff looks quite messy to me. Any help would be appreciated.
> Cedric
>


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