inav icon indicating copy to clipboard operation
inav copied to clipboard

for burst mode dmar, define as DMA_REQUEST_TIMx_UP

Open sensei-hacker opened this issue 6 months ago • 4 comments

This small change seems to solve the issue on DMA / DSHOT not working on one pin on the H743:

https://github.com/iNavFlight/inav/issues/10835

As tested with this target: https://github.com/iNavFlight/inav/pull/10843

However, I would like to request review by someone who understands the DMA better, probably @shirase or @bkleiner ?

sensei-hacker avatar Jun 02 '25 00:06 sensei-hacker

Add USE_DSHOT_DMAR in target. Nothing else. DEF_TIM_DMA__BTCH_TIM4_CH4 - this channel does not exist physically.

shirase avatar Jun 02 '25 07:06 shirase

Add USE_DSHOT_DMAR in target. Nothing else. DEF_TIM_DMA__BTCH_TIM4_CH4 - this channel does not exist physically.

Agreed, using the UP request to substitute is not a good workaround here.

bkleiner avatar Jun 02 '25 10:06 bkleiner

Thanks for the responses!

Add USE_DSHOT_DMAR in target. Nothing else.

That's the first thing I tried. Unfortunately that didn't work

When that did not work, I went on the adventure trying to figure out how this stuff works. I found that this change made it "work", but I don't have the background knowledge to know the best/right way to fix it.

sensei-hacker avatar Jun 02 '25 14:06 sensei-hacker

dma burst mode use first initialized dma channel for all timer channels. It can not work if first initialized channel is empty. Using DMA_REQUEST_TIM4_UP for dma burst is not break anything. This PR can be merged.

shirase avatar Jun 03 '25 07:06 shirase

i think this one is good to go?

bkleiner avatar Aug 21 '25 06:08 bkleiner