diff --git a/lib/pbio/platform/technic_hub/pbdrvconfig.h b/lib/pbio/platform/technic_hub/pbdrvconfig.h index 2c95da53c..4f2296394 100644 --- a/lib/pbio/platform/technic_hub/pbdrvconfig.h +++ b/lib/pbio/platform/technic_hub/pbdrvconfig.h @@ -11,8 +11,8 @@ #define PBDRV_CONFIG_ADC_STM32_HAL_DMA_INSTANCE DMA1_Channel1 #define PBDRV_CONFIG_ADC_STM32_HAL_DMA_REQUEST DMA_REQUEST_0 #define PBDRV_CONFIG_ADC_STM32_HAL_DMA_IRQ DMA1_Channel1_IRQn -#define PBDRV_CONFIG_ADC_STM32_HAL_TIMER_INSTANCE TIM2 -#define PBDRV_CONFIG_ADC_STM32_HAL_TIMER_TRIGGER ADC_EXTERNALTRIG_T2_TRGO +#define PBDRV_CONFIG_ADC_STM32_HAL_TIMER_INSTANCE TIM6 +#define PBDRV_CONFIG_ADC_STM32_HAL_TIMER_TRIGGER ADC_EXTERNALTRIG_T6_TRGO #define PBDRV_CONFIG_BATTERY (1) #define PBDRV_CONFIG_BATTERY_ADC (1) diff --git a/lib/pbio/platform/technic_hub/platform.c b/lib/pbio/platform/technic_hub/platform.c index aa2216891..7b4e98bc3 100644 --- a/lib/pbio/platform/technic_hub/platform.c +++ b/lib/pbio/platform/technic_hub/platform.c @@ -435,8 +435,8 @@ void SystemInit(void) { RCC_AHB1ENR_CRCEN; RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN | RCC_AHB2ENR_GPIOBEN | RCC_AHB2ENR_GPIOCEN | RCC_AHB2ENR_GPIODEN | RCC_AHB2ENR_GPIOHEN | RCC_AHB2ENR_ADCEN; - RCC->APB1ENR1 |= RCC_APB1ENR1_TIM2EN | RCC_APB1ENR1_WWDGEN | RCC_APB1ENR1_USART2EN | - RCC_APB1ENR1_USART3EN | RCC_APB1ENR1_I2C1EN | RCC_APB1ENR1_PWREN; + RCC->APB1ENR1 |= RCC_APB1ENR1_TIM2EN | RCC_APB1ENR1_TIM6EN | RCC_APB1ENR1_WWDGEN | + RCC_APB1ENR1_USART2EN | RCC_APB1ENR1_USART3EN | RCC_APB1ENR1_I2C1EN | RCC_APB1ENR1_PWREN; RCC->APB1ENR2 |= RCC_APB1ENR2_LPUART1EN; RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN | RCC_APB2ENR_TIM1EN | RCC_APB2ENR_SPI1EN | RCC_APB2ENR_USART1EN | RCC_APB2ENR_TIM15EN | RCC_APB2ENR_TIM16EN;