AIRLink: added LTE module enable pin to hwdef

This commit is contained in:
Kirill Shilov 2022-11-04 13:06:25 +00:00 committed by Andrew Tridgell
parent f51c9b6681
commit 39ddbb4c45
2 changed files with 8 additions and 1 deletions

View File

@ -83,8 +83,12 @@ PD15 VDD_3V3_SENSORS2_EN OUTPUT HIGH
PE7 VDD_3V3_SENSORS3_EN OUTPUT HIGH PE7 VDD_3V3_SENSORS3_EN OUTPUT HIGH
PG8 VDD_3V3_SENSORS4_EN OUTPUT HIGH PG8 VDD_3V3_SENSORS4_EN OUTPUT HIGH
# enable peripherals power pin
PF12 VDD_5V_HIPOWER_EN OUTPUT HIGH PF12 VDD_5V_HIPOWER_EN OUTPUT HIGH
# enable LTE module power pin
PG4 VDD_3V5_LTE_EN OUTPUT HIGH
# drdy pins # drdy pins
PF2 DRDY4_ICM20602 INPUT PF2 DRDY4_ICM20602 INPUT
PH12 MPU_FPC_DRDY INPUT PH12 MPU_FPC_DRDY INPUT

View File

@ -298,7 +298,7 @@ void get_rtc_backup(uint8_t idx, uint32_t *v, uint8_t n)
*/ */
void peripheral_power_enable(void) void peripheral_power_enable(void)
{ {
#if defined(HAL_GPIO_PIN_nVDD_5V_PERIPH_EN) || defined(HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS_EN)|| defined(HAL_GPIO_PIN_VDD_3V3_SENSORS2_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS3_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS4_EN) || defined(HAL_GPIO_PIN_nVDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN) #if defined(HAL_GPIO_PIN_nVDD_5V_PERIPH_EN) || defined(HAL_GPIO_PIN_nVDD_5V_HIPOWER_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS_EN)|| defined(HAL_GPIO_PIN_VDD_3V3_SENSORS2_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS3_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SENSORS4_EN) || defined(HAL_GPIO_PIN_nVDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN) || defined(HAL_GPIO_PIN_VDD_3V5_LTE_EN)
// we don't know what state the bootloader had the CTS pin in, so // we don't know what state the bootloader had the CTS pin in, so
// wait here with it pulled up from the PAL table for enough time // wait here with it pulled up from the PAL table for enough time
// for the radio to be definately powered down // for the radio to be definately powered down
@ -336,6 +336,9 @@ void peripheral_power_enable(void)
#ifdef HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN #ifdef HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN
// others need it active high // others need it active high
palWriteLine(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN, 1); palWriteLine(HAL_GPIO_PIN_VDD_3V3_SD_CARD_EN, 1);
#endif
#ifdef HAL_GPIO_PIN_VDD_3V5_LTE_EN
palWriteLine(HAL_GPIO_PIN_VDD_3V5_LTE_EN, 1);
#endif #endif
for (i=0; i<20; i++) { for (i=0; i<20; i++) {
// give 20ms for sensors to settle // give 20ms for sensors to settle