Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMA abort #722

Closed
9ary opened this issue Nov 16, 2023 · 0 comments · Fixed by #803
Closed

DMA abort #722

9ary opened this issue Nov 16, 2023 · 0 comments · Fixed by #803

Comments

@9ary
Copy link
Contributor

9ary commented Nov 16, 2023

I'm implementing an SPI-like slave for a project, and I would like to be able to abort the DMA transfer if CS is de-asserted before completion.

Currently it looks like the HAL doesn't implement this feature at all.

Reading section 2.5.5.3. Channel Abort of the datasheet, the sequence is fairly simple (including the errata workarounds):

  • save and disable the channel's IRQ
  • set the corresponding bit in the CHAN_ABORT register
  • poll the busy flag until it clears
  • clear the spurious interrupt
  • restore the channel's IRQ enable

I'll probably PR this, just opening a tracking issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant