aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers/boards/px4fmuv2/px4fmu_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/drivers/boards/px4fmuv2/px4fmu_init.c')
-rw-r--r--apps/drivers/boards/px4fmuv2/px4fmu_init.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/apps/drivers/boards/px4fmuv2/px4fmu_init.c b/apps/drivers/boards/px4fmuv2/px4fmu_init.c
index c9364c2a4..1d99f15bf 100644
--- a/apps/drivers/boards/px4fmuv2/px4fmu_init.c
+++ b/apps/drivers/boards/px4fmuv2/px4fmu_init.c
@@ -145,7 +145,17 @@ __EXPORT int matherr(struct exception *e)
__EXPORT int nsh_archinitialize(void)
{
- int result;
+
+ /* configure ADC pins */
+ stm32_configgpio(GPIO_ADC1_IN10);
+ stm32_configgpio(GPIO_ADC1_IN11);
+ stm32_configgpio(GPIO_ADC1_IN12);
+
+ /* configure power supply control pins */
+ stm32_configgpio(GPIO_VDD_5V_PERIPH_EN);
+ stm32_configgpio(GPIO_VDD_2V8_SENSORS_EN);
+ stm32_configgpio(GPIO_VDD_5V_HIPOWER_OC);
+ stm32_configgpio(GPIO_VDD_5V_PERIPH_OC);
/* configure the high-resolution time/callout interface */
hrt_init();
@@ -201,7 +211,7 @@ __EXPORT int nsh_archinitialize(void)
/* Get the SPI port for the FRAM */
message("[boot] Initializing SPI port 2\n");
- spi2 = up_spiinitialize(3);
+ spi2 = up_spiinitialize(2);
if (!spi2) {
message("[boot] FAILED to initialize SPI port 2\n");
@@ -215,10 +225,5 @@ __EXPORT int nsh_archinitialize(void)
//message("[boot] Successfully bound SPI port 2 to the FRAM driver\n");
- /* configure ADC pins */
- stm32_configgpio(GPIO_ADC1_IN10);
- stm32_configgpio(GPIO_ADC1_IN11);
- stm32_configgpio(GPIO_ADC1_IN12);
-
return OK;
}