enabling TIM8 ICU

This commit is contained in:
rusefi 2019-12-25 09:28:51 -05:00
parent 50d78f648b
commit 5eae7e50f4
5 changed files with 21 additions and 10 deletions

View File

@ -244,7 +244,7 @@
#define STM32_ICU_USE_TIM3 TRUE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM5 FALSE
#define STM32_ICU_USE_TIM8 FALSE
#define STM32_ICU_USE_TIM8 TRUE
#define STM32_ICU_USE_TIM9 TRUE
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY

View File

@ -255,7 +255,7 @@
#define STM32_ICU_USE_TIM3 TRUE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM5 FALSE
#define STM32_ICU_USE_TIM8 FALSE
#define STM32_ICU_USE_TIM8 TRUE
#define STM32_ICU_USE_TIM9 TRUE
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY

View File

@ -103,6 +103,11 @@ static uint32_t getAlternateFunctions(ICUDriver *driver) {
return GPIO_AF_TIM4;
}
#endif
#if STM32_ICU_USE_TIM8
if (driver == &ICUD8) {
return GPIO_AF_TIM8;
}
#endif
#if STM32_ICU_USE_TIM9
if (driver == &ICUD9) {
return GPIO_AF_TIM9;

View File

@ -2,10 +2,10 @@
* @file mpu_util.h
*
* @date Jul 27, 2014
* @author Andrey Belomutskiy, (c) 2012-2017
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#ifndef MPU_UTIL_H_
#define MPU_UTIL_H_
#pragma once
#include "stm32f4xx_hal_flash_ex.h"
#include "stm32_common_mpu_util.h"
@ -34,6 +34,10 @@
#define GPIO_AF_TIM5 2
#endif
#ifndef GPIO_AF_TIM8
#define GPIO_AF_TIM8 3
#endif
#ifndef GPIO_AF_TIM9
#define GPIO_AF_TIM9 3
#endif
@ -73,7 +77,6 @@ void HardFaultVector(void);
}
#endif /* __cplusplus */
#endif /* MPU_UTIL_H_ */
#if HAL_USE_SPI
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,

View File

@ -2,10 +2,10 @@
* @file mpu_util.h
*
* @date Jul 27, 2014
* @author Andrey Belomutskiy, (c) 2012-2017
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#ifndef MPU_UTIL_H_
#define MPU_UTIL_H_
#pragma once
#include "stm32f7xx_hal_flash_ex.h"
#include "stm32_common_mpu_util.h"
@ -35,6 +35,10 @@
#define GPIO_AF_TIM5 2
#endif
#ifndef GPIO_AF_TIM8
#define GPIO_AF_TIM8 3
#endif
#ifndef GPIO_AF_TIM9
#define GPIO_AF_TIM9 3
#endif
@ -76,7 +80,6 @@ void HardFaultVector(void);
}
#endif /* __cplusplus */
#endif /* MPU_UTIL_H_ */
#if HAL_USE_SPI
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,