diff --git a/boards/modalai/fc-v1/src/board_config.h b/boards/modalai/fc-v1/src/board_config.h index b2ecb5591f..fda77a08da 100644 --- a/boards/modalai/fc-v1/src/board_config.h +++ b/boards/modalai/fc-v1/src/board_config.h @@ -252,6 +252,10 @@ /* HW has to large of R termination on ADC todo:change when HW value is chosen */ +#define HW_REV_VER_ADC_BASE STM32_ADC3_BASE + +#define SYSTEM_ADC_BASE STM32_ADC1_BASE + #define BOARD_ADC_OPEN_CIRCUIT_V (5.6f) /* HW Version and Revision drive signals Default to 1 to detect */ diff --git a/boards/modalai/fc-v1/src/init.c b/boards/modalai/fc-v1/src/init.c index da88ff6b25..ea2b97a640 100644 --- a/boards/modalai/fc-v1/src/init.c +++ b/boards/modalai/fc-v1/src/init.c @@ -283,6 +283,9 @@ __EXPORT int board_app_initialize(uintptr_t arg) VDD_3V3_SD_CARD_EN(true); VDD_3V3_SPEKTRUM_POWER_EN(true); + /* Need hrt running before using the ADC */ + + px4_platform_init(); if (OK == board_determine_hw_info()) { syslog(LOG_INFO, "[boot] Rev 0x%1x : Ver 0x%1x %s\n", board_get_hw_revision(), board_get_hw_version(), @@ -292,8 +295,6 @@ __EXPORT int board_app_initialize(uintptr_t arg) syslog(LOG_ERR, "[boot] Failed to read HW revision and version\n"); } - px4_platform_init(); - /* configure the DMA allocator */ if (board_dma_alloc_init() < 0) {