atsamd icon indicating copy to clipboard operation
atsamd copied to clipboard

Updates the DMAC peripheral to use the `clock::v2` API

Open kyp44 opened this issue 4 months ago • 3 comments

Summary

As part of the clock::v2 effort tracked in Issue #912, this PR updates the dmac to use the clock::v2 API by requiring ownership of its AhbClk for thumbv7 targets.

See the commit message for details.

The following Tier 1 BSP examples were also updated to include the change:

  • samd11_bare/i2c
  • feather_m0/async_dmac
  • feather_m0/async_i2c
  • feather_m0/async_spi
  • feather_m0/async_uart
  • feather_m0/dmac
  • feather_m0/i2c
  • feather_m0/spi
  • feather_m0/uart_dma_blocking
  • feather_m0/uart_dma_nonblocking
  • feather_m4/dmac
  • metro_m0/i2c
  • metro_m0/spi
  • metro_m4/async_dmac

The following Tier 1 BSP examples are now broken and cannot be fixed until the noted peripherals are also migrated and merged (see the notes about this in Issue #912):

  • feather_m4/i2c (sercom::i2c::Config)
  • feather_m4/spi (sercom::spi::Config)
  • feather_m4/uart_dma_blocking (sercom::uart::Config)
  • feather_m4/uart_dma_nonblocking (sercom::uart::Config)
  • metro_m4/async_i2c (sercom::i2c::Config)
  • metro_m4/async_spi (sercom::spi::Config)
  • metro_m4/async_uart (sercom::uart::Config)
  • metro_m4/i2c (sercom::i2c::Config)
  • metro_m4/spi (sercom::spi::Config)

Checklist

  • [X] All new or modified code is well documented, especially public items
  • [X] No new warnings or clippy suggestions have been introduced - CI will deny clippy warnings by default! You may #[allow] certain lints where reasonable, but ideally justify those with a short comment.

kyp44 avatar Aug 08 '25 16:08 kyp44

Apart from the discussion question, I'm happy for this to be merged into our Clock V2 branch, then we can fix the examples once the other peripherals are migrated

rnd-ash avatar Nov 13 '25 08:11 rnd-ash

A merge is good with me. I don't think we need to track the broken examples in the branch as we go. I have a script to go build all the Tier 1 BSPs so they will be easy to assess the broken examples at any point, plus we can refer back to the PRs to know when requisite peripherals have been merged.

kyp44 avatar Nov 13 '25 17:11 kyp44

Exactly! The examples will be fixed as we go :)

rnd-ash avatar Nov 13 '25 18:11 rnd-ash