diff --git a/boards/holybro/kakutef7/default.cmake b/boards/holybro/kakutef7/default.cmake index 6c1aeb9beb..ef769e8bd7 100644 --- a/boards/holybro/kakutef7/default.cmake +++ b/boards/holybro/kakutef7/default.cmake @@ -19,6 +19,7 @@ px4_add_board( DRIVERS adc barometer/bmp280 + dshot gps imu/mpu6000 magnetometer diff --git a/boards/holybro/kakutef7/nuttx-config/include/board.h b/boards/holybro/kakutef7/nuttx-config/include/board.h index 29b9a2d56c..fd5b29b6d3 100644 --- a/boards/holybro/kakutef7/nuttx-config/include/board.h +++ b/boards/holybro/kakutef7/nuttx-config/include/board.h @@ -270,11 +270,6 @@ #define GPIO_UART7_RX GPIO_UART7_RX_1 /* PE7 */ #define GPIO_UART7_TX GPIO_UART7_TX_1 /* PE8 */ -/* UART RX DMA configurations */ - -#define DMAMAP_USART1_RX DMAMAP_USART1_RX_2 -#define DMAMAP_USART6_RX DMAMAP_USART6_RX_2 - /* SPI * SPI1 SD Card * SPI2 is OSD AT7456E diff --git a/boards/holybro/kakutef7/nuttx-config/nsh/defconfig b/boards/holybro/kakutef7/nuttx-config/nsh/defconfig index c6b82856f1..4a5071a58d 100644 --- a/boards/holybro/kakutef7/nuttx-config/nsh/defconfig +++ b/boards/holybro/kakutef7/nuttx-config/nsh/defconfig @@ -1,3 +1,10 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# # CONFIG_DISABLE_OS_API is not set # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set # CONFIG_MMCSD_HAVE_CARDDETECT is not set @@ -156,6 +163,7 @@ CONFIG_STM32F7_BBSRAM=y CONFIG_STM32F7_BBSRAM_FILES=5 CONFIG_STM32F7_BKPSRAM=y CONFIG_STM32F7_DMA1=y +CONFIG_STM32F7_DMA2=y CONFIG_STM32F7_I2C1=y CONFIG_STM32F7_I2C_DYNTIMEO=y CONFIG_STM32F7_I2C_DYNTIMEO_STARTSTOP=10 @@ -191,7 +199,6 @@ CONFIG_TASK_NAME_SIZE=24 CONFIG_TIME_EXTENDED=y CONFIG_UART4_BAUD=57600 CONFIG_UART4_RXBUFSIZE=600 -CONFIG_UART4_RXDMA=y CONFIG_UART4_TXBUFSIZE=1500 CONFIG_UART7_BAUD=57600 CONFIG_UART7_RXBUFSIZE=600 diff --git a/boards/holybro/kakutef7/src/timer_config.c b/boards/holybro/kakutef7/src/timer_config.c index 325d6a1608..bbe5680bfc 100644 --- a/boards/holybro/kakutef7/src/timer_config.c +++ b/boards/holybro/kakutef7/src/timer_config.c @@ -60,7 +60,13 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = { .last_channel_index = 1, .handler = io_timer_handler0, .vectorno = STM32_IRQ_TIM3, - + .dshot = { + .dma_base = DSHOT_DMA1_BASE, + .channel = DShot_Channel5, + .stream = DShot_Stream2, + .start_ccr_register = TIM_DMABASE_CCR3, + .channels_number = 2u /* CCR3 and CCR4 */ + } }, { .base = STM32_TIM1_BASE, @@ -71,7 +77,13 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = { .last_channel_index = 3, .handler = io_timer_handler1, .vectorno = STM32_IRQ_TIM1CC, - + .dshot = { + .dma_base = DSHOT_DMA2_BASE, + .channel = DShot_Channel6, + .stream = DShot_Stream5, + .start_ccr_register = TIM_DMABASE_CCR1, + .channels_number = 2u /* CCR1 and CCR2 */ + } }, { .base = STM32_TIM8_BASE, @@ -82,6 +94,13 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = { .last_channel_index = 4, .handler = io_timer_handler2, .vectorno = STM32_IRQ_TIM8CC, + .dshot = { + .dma_base = DSHOT_DMA2_BASE, + .channel = DShot_Channel7, + .stream = DShot_Stream1, + .start_ccr_register = TIM_DMABASE_CCR4, + .channels_number = 1u /* CCR4 */ + } }, { .base = STM32_TIM5_BASE, @@ -92,6 +111,13 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = { .last_channel_index = 5, .handler = io_timer_handler3, .vectorno = STM32_IRQ_TIM5, + .dshot = { + .dma_base = DSHOT_DMA1_BASE, + .channel = DShot_Channel6, + .stream = DShot_Stream6, // alternatively DShot_Stream0 + .start_ccr_register = TIM_DMABASE_CCR4, + .channels_number = 1u /* CCR4 */ + } } };