I have a strange problem. I am trying to prematurely end a dshot pulse driven by DMAR because its allowed timeslot has expired. All works well unless I actually try and cancel while the DMAR burst is in progress. If I do this the burst inexplicably just continues - so instead of stopping it goes on forever.
I am cancelling using dmaStreamDisable() - is there a safer way to achieve what I want that might actually stop the pulse?
I would post a picture of the Saleae trace, but difficult with this forum tech.
Cancelling DMAR in progress
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Cancelling DMAR in progress
I never used that feature, is it the DMA "going on forever" or is the timer stuck?
Check if the DMA stream is actually stopped.
Giovanni
Check if the DMA stream is actually stopped.
Giovanni
Re: Cancelling DMAR in progress
Giovanni wrote:I never used that feature, is it the DMA "going on forever" or is the timer stuck?
Check if the DMA stream is actually stopped.
Giovanni
Thanks Giovanni, well dmaStreamDisable() doesn't return until the EN bit is 0 - so seems like it must be stopped, maybe its that the timer is stuck - what's the best way to unstick it? Disable the timer?
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Cancelling DMAR in progress
Try disabling, worst case you can reset it using RCC macros.
Giovanni
Giovanni
Re: Cancelling DMAR in progress
Giovanni wrote:Try disabling, worst case you can reset it using RCC macros.
Giovanni
A friend pointed out that DMAR uses a final 0 in the DMA buffer to reset the timer, if it doesn't see this it continues for ever. Simply resetting the CCR registers in the timer fixes this.
Who is online
Users browsing this forum: No registered users and 16 guests