From 0b93dbf010497b9d95ee643b071f5461aad5ba76 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 10 Apr 2024 19:09:54 +0900 Subject: [PATCH 1/6] AP_HAL_ChibiOS: Pixhawk6X peripheral power on at startup --- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat | 6 +++--- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat index 8ca7a6488f8d6..a8da5509565d1 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat @@ -60,9 +60,9 @@ PD9 USART3_RX USART3 # armed indication PE6 nARMED OUTPUT HIGH -# start peripheral power off -PF12 nVDD_5V_HIPOWER_EN OUTPUT HIGH -PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH +# start peripheral power on +PF12 nVDD_5V_HIPOWER_EN OUTPUT LOW +PG4 nVDD_5V_PERIPH_EN OUTPUT LOW # LEDs PE3 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # red diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat index 1cf5be3a9f743..f61919636d974 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat @@ -227,11 +227,9 @@ PF4 VDD_3V3_SENSORS2_EN OUTPUT HIGH PE7 VDD_3V3_SENSORS3_EN OUTPUT HIGH PG8 VDD_3V3_SENSORS4_EN OUTPUT HIGH -# start peripheral power off, then enable after init -# this prevents a problem with radios that use RTS for -# bootloader hold -PG10 nVDD_5V_HIPOWER_EN OUTPUT HIGH -PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH +# start peripheral power on +PG10 nVDD_5V_HIPOWER_EN OUTPUT LOW +PG4 nVDD_5V_PERIPH_EN OUTPUT LOW # Control of Spektrum power pin PH2 SPEKTRUM_PWR OUTPUT HIGH GPIO(73) From 794e581240fee86dea549246e2c1b7378be83e09 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 16 Apr 2024 11:53:04 +0900 Subject: [PATCH 2/6] AP_HAL_ChibiOS: Pixhawk6C peripheral power on at startup --- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef-bl.dat | 6 +++--- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef-bl.dat index da0f10b992803..e80be6d00203b 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef-bl.dat @@ -59,9 +59,9 @@ PD2 UART5_RX UART5 PD8 USART3_TX USART3 PD9 USART3_RX USART3 -# start peripheral power off -PC10 nVDD_5V_HIPOWER_EN OUTPUT HIGH -PE2 nVDD_5V_PERIPH_EN OUTPUT HIGH +# start peripheral power on +PC10 nVDD_5V_HIPOWER_EN OUTPUT LOW +PE2 nVDD_5V_PERIPH_EN OUTPUT LOW # LEDs PD10 LED_ACTIVITY OUTPUT OPENDRAIN GPIO(90) HIGH # red diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat index 4677c93b2ab37..7872fc8e50a10 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat @@ -164,11 +164,9 @@ define HAL_IMUHEAT_I_DEFAULT 0.07 # power enable pins PB2 VDD_3V3_SENSORS1_EN OUTPUT HIGH -# start peripheral power off, then enable after init -# this prevents a problem with radios that use RTS for -# bootloader hold -PC10 nVDD_5V_HIPOWER_EN OUTPUT HIGH -PE2 nVDD_5V_PERIPH_EN OUTPUT HIGH +# start peripheral power on +PC10 nVDD_5V_HIPOWER_EN OUTPUT LOW +PE2 nVDD_5V_PERIPH_EN OUTPUT LOW # Control of Spektrum power pin PH2 SPEKTRUM_PWR OUTPUT HIGH GPIO(73) From 202d9ceb025ab1762f35a420b0cdab23200679c6 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 16 Apr 2024 11:52:54 +0900 Subject: [PATCH 3/6] AP_HAL_ChibiOS: Pixhawk5X peripheral power on at startup --- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef-bl.dat | 6 +++--- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef.dat | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef-bl.dat index 5b9a535f5ef22..82db60d63e53c 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef-bl.dat @@ -70,9 +70,9 @@ PD9 USART3_RX USART3 NODMA # armed indication PC12 nARMED OUTPUT HIGH -# start peripheral power off -PF12 nVDD_5V_HIPOWER_EN OUTPUT HIGH -PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH +# start peripheral power on +PF12 nVDD_5V_HIPOWER_EN OUTPUT LOW +PG4 nVDD_5V_PERIPH_EN OUTPUT LOW # LEDs PE3 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # red diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef.dat index 0be4c176b5f2f..bc0651cf2a7cd 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk5X/hwdef.dat @@ -214,11 +214,9 @@ PD15 VDD_3V3_SENSORS2_EN OUTPUT HIGH PE7 VDD_3V3_SENSORS3_EN OUTPUT HIGH PG8 VDD_3V3_SENSORS4_EN OUTPUT HIGH -# start peripheral power off, then enable after init -# this prevents a problem with radios that use RTS for -# bootloader hold -PF12 nVDD_5V_HIPOWER_EN OUTPUT HIGH -PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH +# start peripheral power on +PF12 nVDD_5V_HIPOWER_EN OUTPUT LOW +PG4 nVDD_5V_PERIPH_EN OUTPUT LOW # Control of Spektrum power pin PH2 SPEKTRUM_PWR OUTPUT HIGH GPIO(73) From b83911f01da3e927ace4c6108e1beb7e1a325a0d Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 16 Apr 2024 11:52:37 +0900 Subject: [PATCH 4/6] AP_HAL_ChibiOS: Durandal peripheral power on at startup --- libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat index 5f7421a78f114..50f6407581421 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat @@ -107,11 +107,9 @@ define HAL_I2C_INTERNAL_MASK 1 # enable pins PE3 VDD_3V3_SENSORS_EN OUTPUT LOW -# start peripheral power off, then enable after init -# this prevents a problem with radios that use RTS for -# bootloader hold -PF12 nVDD_5V_HIPOWER_EN OUTPUT HIGH -PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH +# start peripheral power on +PF12 nVDD_5V_HIPOWER_EN OUTPUT LOW +PG4 nVDD_5V_PERIPH_EN OUTPUT LOW PG5 VDD_5V_RC_EN OUTPUT HIGH PG6 VDD_5V_WIFI_EN OUTPUT HIGH From 36169d0e9dce076793be340e60050b8b08c1e4e5 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 16 Apr 2024 11:59:45 +0900 Subject: [PATCH 5/6] AP_HAL_ChibiOS: correct CUAV-X7 periph power comment --- libraries/AP_HAL_ChibiOS/hwdef/CUAV-X7/hwdef.dat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CUAV-X7/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-X7/hwdef.dat index 7437418d97a72..92d316f80ab61 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CUAV-X7/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-X7/hwdef.dat @@ -105,9 +105,7 @@ define HAL_I2C_INTERNAL_MASK 1 # enable pins PE3 VDD_3V3_SENSORS_EN OUTPUT LOW -# start peripheral power off, then enable after init -# this prevents a problem with radios that use RTS for -# bootloader hold +# start peripheral power on PD11 VDD_5V_HIPOWER_EN OUTPUT HIGH PG4 VDD_5V_PERIPH_EN OUTPUT HIGH From c69bc162eba355c8689b14c117da2e9ddf2c93b3 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 16 Apr 2024 11:59:54 +0900 Subject: [PATCH 6/6] AP_HAL_ChibiOS: correct CUAV-Nora periph power comment --- libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora/hwdef.dat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora/hwdef.dat index b16621fed42c3..cab64cc1697eb 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora/hwdef.dat @@ -105,9 +105,7 @@ define HAL_I2C_INTERNAL_MASK 1 # enable pins PE3 VDD_3V3_SENSORS_EN OUTPUT LOW -# start peripheral power off, then enable after init -# this prevents a problem with radios that use RTS for -# bootloader hold +# start peripheral power on PD11 VDD_5V_HIPOWER_EN OUTPUT HIGH PG4 VDD_5V_PERIPH_EN OUTPUT HIGH