Skip to content

Commit

Permalink
px4_fmu-v5x:SE050 Assert Reset on board_init, and release in appinit
Browse files Browse the repository at this point in the history
  • Loading branch information
davids5 authored and dagar committed Dec 3, 2019
1 parent 949ab56 commit feaa657
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions boards/px4/fmu-v5x/src/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
#define BOARD_I2C_BUS_CLOCK_INIT {100000, 100000, 100000, 100000}

#define GPIO_I2C4_DRDY1_BMP388 /* PG5 */ (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN5)
#define A71CH_nRST /* PG6 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN6)
#define GPIO_SE050_nRST /* PG6 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN6)

/*
* ADC channels
Expand Down Expand Up @@ -482,7 +482,9 @@
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
#define VDD_3V3_ETH_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_ETH_POWER_EN, (on_true))
#define VDD_3V3_ETH_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_ETH_POWER_EN, (on_true))
#define SE050_RESET(reset_true) px4_arch_gpiowrite(GPIO_SE050_nRST, !(reset_true))


/* Tone alarm output */

Expand Down Expand Up @@ -656,6 +658,7 @@
GPIO_TONE_ALARM_IDLE, \
GPIO_nSAFETY_SWITCH_LED_OUT_INIT, \
GPIO_SAFETY_SWITCH_IN, \
GPIO_SE050_nRST, \
GPIO_nARMED_INIT \
}

Expand Down
1 change: 1 addition & 0 deletions boards/px4/fmu-v5x/src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_5V_HIPOWER_EN(true);
board_spi_reset(0xff00000A);
VDD_3V3_SPEKTRUM_POWER_EN(true);
SE050_RESET(false);

/* Need hrt running before using the ADC */

Expand Down

0 comments on commit feaa657

Please sign in to comment.