mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
fmu-v5x: enable DShot
Only the first 6 FMU pins support it. DMA conflict with UART8, which is the GPS2 port.
This commit is contained in:
@@ -24,7 +24,7 @@ px4_add_board(
|
|||||||
camera_trigger
|
camera_trigger
|
||||||
differential_pressure # all available differential pressure drivers
|
differential_pressure # all available differential pressure drivers
|
||||||
distance_sensor # all available distance sensor drivers
|
distance_sensor # all available distance sensor drivers
|
||||||
#dshot
|
dshot
|
||||||
gps
|
gps
|
||||||
#heater
|
#heater
|
||||||
#imu # all available imu drivers
|
#imu # all available imu drivers
|
||||||
|
|||||||
@@ -258,7 +258,6 @@ CONFIG_UART7_RXDMA=y
|
|||||||
CONFIG_UART7_TXBUFSIZE=3000
|
CONFIG_UART7_TXBUFSIZE=3000
|
||||||
CONFIG_UART8_BAUD=57600
|
CONFIG_UART8_BAUD=57600
|
||||||
CONFIG_UART8_RXBUFSIZE=600
|
CONFIG_UART8_RXBUFSIZE=600
|
||||||
CONFIG_UART8_RXDMA=y
|
|
||||||
CONFIG_UART8_TXBUFSIZE=1500
|
CONFIG_UART8_TXBUFSIZE=1500
|
||||||
CONFIG_USART1_BAUD=57600
|
CONFIG_USART1_BAUD=57600
|
||||||
CONFIG_USART1_RXBUFSIZE=600
|
CONFIG_USART1_RXBUFSIZE=600
|
||||||
|
|||||||
@@ -426,6 +426,8 @@
|
|||||||
|
|
||||||
#define DIRECT_INPUT_TIMER_CHANNELS 8
|
#define DIRECT_INPUT_TIMER_CHANNELS 8
|
||||||
|
|
||||||
|
#define BOARD_DSHOT_MOTOR_ASSIGNMENT {3, 2, 1, 0, 4, 5, 6, 7};
|
||||||
|
|
||||||
|
|
||||||
/* User GPIOs
|
/* User GPIOs
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -83,7 +83,12 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
|||||||
.last_channel_index = 3,
|
.last_channel_index = 3,
|
||||||
.handler = io_timer_handler0,
|
.handler = io_timer_handler0,
|
||||||
.vectorno = STM32_IRQ_TIM1CC,
|
.vectorno = STM32_IRQ_TIM1CC,
|
||||||
|
.dshot = {
|
||||||
|
.dma_base = STM32_DMA2_BASE,
|
||||||
|
.dmamap = DMAMAP_TIM1_UP,
|
||||||
|
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||||
|
.channels_number = 4u /* CCR1, CCR2, CCR3 and CCR4 */
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.base = STM32_TIM4_BASE,
|
.base = STM32_TIM4_BASE,
|
||||||
@@ -94,6 +99,12 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
|||||||
.last_channel_index = 5,
|
.last_channel_index = 5,
|
||||||
.handler = io_timer_handler1,
|
.handler = io_timer_handler1,
|
||||||
.vectorno = STM32_IRQ_TIM4,
|
.vectorno = STM32_IRQ_TIM4,
|
||||||
|
.dshot = {
|
||||||
|
.dma_base = STM32_DMA1_BASE,
|
||||||
|
.dmamap = DMAMAP_TIM4_UP,
|
||||||
|
.start_ccr_register = TIM_DMABASE_CCR2,
|
||||||
|
.channels_number = 2u /* CCR2 and CCR3 */
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.base = STM32_TIM12_BASE,
|
.base = STM32_TIM12_BASE,
|
||||||
|
|||||||
Reference in New Issue
Block a user