mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
boards: add UAVCAN timer override mechanism and CUAV X7 add CAN (#15348)
* X7Pro adds CAN driver * UAVCAN timer selection moved to default.cmake * Modify some details about @CUAVcaijie UAVCAN timer selection moved to default.cmake * Put some timer parameters to micro_hal.h from board_config.h. Fix all h7 boards Co-authored-by: honglang <honglang@cuav.net>
This commit is contained in:
@@ -153,8 +153,7 @@
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 3 /* use timer3 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 3 /* use capture/compare channel 3 */
|
||||
#define STM32_RCC_APB1ENR STM32_RCC_APB1LENR
|
||||
#define RCC_APB1ENR_TIM3EN RCC_APB1LENR_TIM3EN
|
||||
|
||||
|
||||
#define HRT_PPM_CHANNEL /* T3C1 */ 1 /* use capture/compare channel 1 */
|
||||
#define GPIO_PPM_IN /* PB4 T3C1 */ GPIO_TIM3_CH1IN_2
|
||||
|
||||
@@ -9,7 +9,8 @@ px4_add_board(
|
||||
ROMFSROOT px4fmu_common
|
||||
BUILD_BOOTLOADER
|
||||
TESTING
|
||||
# UAVCAN_INTERFACES 2 - No H7 or FD can support in UAVCAN
|
||||
UAVCAN_INTERFACES 2
|
||||
UAVCAN_TIMER_OVERRIDE 2
|
||||
SERIAL_PORTS
|
||||
GPS1:/dev/ttyS0
|
||||
TEL1:/dev/ttyS1
|
||||
@@ -56,7 +57,7 @@ px4_add_board(
|
||||
telemetry # all available telemetry drivers
|
||||
test_ppm
|
||||
tone_alarm
|
||||
# uavcan - No H7 or FD can support in UAVCAN yet
|
||||
uavcan
|
||||
MODULES
|
||||
airspeed_selector
|
||||
attitude_estimator_q
|
||||
|
||||
@@ -193,6 +193,9 @@
|
||||
#define STM32_RCC_D3CCIPR_SPI6SRC RCC_D3CCIPR_SPI6SEL_PLL2 /* SPI6 clock source */
|
||||
#define STM32_RCC_D2CCIP2R_USBSRC RCC_D2CCIP2R_USBSEL_PLL3 /* USB 1 and 2 clock source */
|
||||
#define STM32_RCC_D3CCIPR_ADCSEL RCC_D3CCIPR_ADCSEL_PLL2 /* ADC 1 2 3 clock source */
|
||||
#define STM32_RCC_D2CCIP1R_FDCANSEL RCC_D2CCIP1R_FDCANSEL_HSE /* FDCAN 1 2 clock source */
|
||||
|
||||
#define STM32_FDCANCLK STM32_HSE_FREQUENCY
|
||||
|
||||
/* FLASH wait states */
|
||||
#define BOARD_FLASH_WAITSTATES 2
|
||||
|
||||
@@ -153,8 +153,7 @@
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 3 /* use timer3 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 3 /* use capture/compare channel 3 */
|
||||
#define STM32_RCC_APB1ENR STM32_RCC_APB1LENR
|
||||
#define RCC_APB1ENR_TIM3EN RCC_APB1LENR_TIM3EN
|
||||
|
||||
|
||||
#define HRT_PPM_CHANNEL /* T3C1 */ 1 /* use capture/compare channel 1 */
|
||||
#define GPIO_PPM_IN /* PB4 T3C1 */ GPIO_TIM3_CH1IN_2
|
||||
|
||||
@@ -107,11 +107,6 @@
|
||||
#define GPIO_nVDD_5V_HIPOWER_OC /* PE10 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTE|GPIO_PIN10) // VDD_5V_HIPOWER_OC
|
||||
|
||||
/* Tone alarm output */
|
||||
#define STM32_RCC_APB1ENR STM32_RCC_APB1LENR /* This is stupid and only applies for H7 */
|
||||
#define STM32_RCC_APB1RSTR STM32_RCC_APB1LRSTR /* This is stupid and only applies for H7 */
|
||||
#define RCC_APB1ENR_TIM2EN RCC_APB1LENR_TIM2EN /* This is stupid and only applies for H7 */
|
||||
#define RCC_APB1ENR_TIM5EN RCC_APB1LENR_TIM5EN /* This is stupid and only applies for H7 */
|
||||
#define RCC_APB1RSTR_TIM5RST RCC_APB1LRSTR_TIM5RST /* This is stupid and only applies for H7 */
|
||||
#define TONE_ALARM_TIMER 2 /* timer 2 */
|
||||
#define TONE_ALARM_CHANNEL 1 /* PA15 TIM2_CH1 */
|
||||
|
||||
|
||||
@@ -111,8 +111,7 @@
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 2 /* use timer2 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 3 /* use capture/compare channel 3 */
|
||||
#define STM32_RCC_APB1ENR STM32_RCC_APB1LENR
|
||||
#define RCC_APB1ENR_TIM2EN RCC_APB1LENR_TIM2EN /* This is stupid and only applies for H7 */
|
||||
|
||||
|
||||
/* RC Serial port */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user