mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 06:01:35 +08:00
DShot: updated driver to use NuttX DMA functions (#13233)
This commit is contained in:
@@ -61,9 +61,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM3,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA1_BASE,
|
||||
.channel = DShot_Channel5,
|
||||
.stream = DShot_Stream2,
|
||||
.dma_base = STM32_DMA1_BASE,
|
||||
.dmamap = DMAMAP_TIM3_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR3,
|
||||
.channels_number = 2u /* CCR3 and CCR4 */
|
||||
}
|
||||
@@ -78,9 +77,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler1,
|
||||
.vectorno = STM32_IRQ_TIM1CC,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA2_BASE,
|
||||
.channel = DShot_Channel6,
|
||||
.stream = DShot_Stream5,
|
||||
.dma_base = STM32_DMA2_BASE,
|
||||
.dmamap = DMAMAP_TIM1_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||
.channels_number = 2u /* CCR1 and CCR2 */
|
||||
}
|
||||
@@ -95,9 +93,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler2,
|
||||
.vectorno = STM32_IRQ_TIM8CC,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA2_BASE,
|
||||
.channel = DShot_Channel7,
|
||||
.stream = DShot_Stream1,
|
||||
.dma_base = STM32_DMA2_BASE,
|
||||
.dmamap = DMAMAP_TIM8_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR4,
|
||||
.channels_number = 1u /* CCR4 */
|
||||
}
|
||||
@@ -112,9 +109,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler3,
|
||||
.vectorno = STM32_IRQ_TIM5,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA1_BASE,
|
||||
.channel = DShot_Channel6,
|
||||
.stream = DShot_Stream6, // alternatively DShot_Stream0
|
||||
.dma_base = STM32_DMA1_BASE,
|
||||
.dmamap = DMAMAP_TIM5_UP_2,
|
||||
.start_ccr_register = TIM_DMABASE_CCR4,
|
||||
.channels_number = 1u /* CCR4 */
|
||||
}
|
||||
|
||||
@@ -76,9 +76,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM1CC,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA2_BASE,
|
||||
.channel = DShot_Channel6,
|
||||
.stream = DShot_Stream5,
|
||||
.dma_base = STM32_DMA2_BASE,
|
||||
.dmamap = DMAMAP_TIM1_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||
.channels_number = 4u /* CCR1, CCR2, CCR3 and CCR4 */
|
||||
}
|
||||
|
||||
@@ -61,9 +61,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler1,
|
||||
.vectorno = STM32_IRQ_TIM2,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA1_BASE,
|
||||
.channel = DShot_Channel3,
|
||||
.stream = DShot_Stream1,
|
||||
.dma_base = STM32_DMA1_BASE,
|
||||
.dmamap = DMAMAP_TIM2_UP_1,
|
||||
.start_ccr_register = TIM_DMABASE_CCR3,
|
||||
.channels_number = 2u /* CCR3 and CCR4 */
|
||||
}
|
||||
@@ -78,9 +77,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler2,
|
||||
.vectorno = STM32_IRQ_TIM3,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA1_BASE,
|
||||
.channel = DShot_Channel5,
|
||||
.stream = DShot_Stream2,
|
||||
.dma_base = STM32_DMA1_BASE,
|
||||
.dmamap = DMAMAP_TIM3_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR3,
|
||||
.channels_number = 2u /* CCR3 and CCR4 */
|
||||
}
|
||||
|
||||
@@ -61,9 +61,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM1CC,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA2_BASE,
|
||||
.channel = DShot_Channel6,
|
||||
.stream = DShot_Stream5,
|
||||
.dma_base = STM32_DMA2_BASE,
|
||||
.dmamap = DMAMAP_TIM1_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||
.channels_number = 4u /* CCR1, CCR2, CCR3 and CCR4 */
|
||||
}
|
||||
@@ -78,9 +77,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler1,
|
||||
.vectorno = STM32_IRQ_TIM4,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA1_BASE,
|
||||
.channel = DShot_Channel2,
|
||||
.stream = DShot_Stream6,
|
||||
.dma_base = STM32_DMA1_BASE,
|
||||
.dmamap = DMAMAP_TIM4_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR2,
|
||||
.channels_number = 2u /* CCR2 and CCR3 */
|
||||
}
|
||||
|
||||
@@ -61,9 +61,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM1CC,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA2_BASE,
|
||||
.channel = DShot_Channel6,
|
||||
.stream = DShot_Stream5,
|
||||
.dma_base = STM32_DMA2_BASE,
|
||||
.dmamap = DMAMAP_TIM1_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||
.channels_number = 4u /* CCR1, CCR2, CCR3 and CCR4 */
|
||||
}
|
||||
@@ -78,9 +77,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler1,
|
||||
.vectorno = STM32_IRQ_TIM4,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA1_BASE,
|
||||
.channel = DShot_Channel2,
|
||||
.stream = DShot_Stream6,
|
||||
.dma_base = STM32_DMA1_BASE,
|
||||
.dmamap = DMAMAP_TIM4_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR2,
|
||||
.channels_number = 2u /* CCR2 and CCR3 */
|
||||
}
|
||||
|
||||
@@ -61,9 +61,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM1CC,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA2_BASE,
|
||||
.channel = DShot_Channel6,
|
||||
.stream = DShot_Stream5,
|
||||
.dma_base = STM32_DMA2_BASE,
|
||||
.dmamap = DMAMAP_TIM1_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||
.channels_number = 4u /* CCR1, CCR2, CCR3 and CCR4 */
|
||||
}
|
||||
@@ -79,12 +78,12 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler1,
|
||||
.vectorno = STM32_IRQ_TIM4,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA1_BASE,
|
||||
.channel = DShot_Channel2,
|
||||
.stream = DShot_Stream6,
|
||||
.dma_base = STM32_DMA1_BASE,
|
||||
.dmamap = DMAMAP_TIM4_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR2,
|
||||
.channels_number = 2u /* CCR2 and CCR3 */
|
||||
.channels_number = 2u // CCR2 and CCR3
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -61,9 +61,8 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM1CC,
|
||||
.dshot = {
|
||||
.dma_base = DSHOT_DMA2_BASE,
|
||||
.channel = DShot_Channel6,
|
||||
.stream = DShot_Stream5,
|
||||
.dma_base = STM32_DMA2_BASE,
|
||||
.dmamap = DMAMAP_TIM1_UP,
|
||||
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||
.channels_number = 4u /* CCR1, CCR2, CCR3 and CCR4 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user