px4_fmu-v5x:SE050 Assert Reset on board_init, and release in appinit

This commit is contained in:
David Sidrane 2019-11-28 08:46:57 -08:00 committed by Daniel Agar
parent 949ab563ef
commit feaa657172
2 changed files with 6 additions and 2 deletions

View File

@ -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
@ -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 */
@ -656,6 +658,7 @@
GPIO_TONE_ALARM_IDLE, \
GPIO_nSAFETY_SWITCH_LED_OUT_INIT, \
GPIO_SAFETY_SWITCH_IN, \
GPIO_SE050_nRST, \
GPIO_nARMED_INIT \
}

View File

@ -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 */