Skip to content

Add SAI DMA peripheral traits and DMA-related helpers#194

Merged
mciantyre merged 1 commit into
imxrt-rs:mainfrom
tacertain:sai-dma
Mar 8, 2026
Merged

Add SAI DMA peripheral traits and DMA-related helpers#194
mciantyre merged 1 commit into
imxrt-rs:mainfrom
tacertain:sai-dma

Conversation

@tacertain

Copy link
Copy Markdown
Contributor

Add DMA support for SAI (Serial Audio Interface) transmit and receive:

  • Implement Destination for sai::Tx (DMA can write to TX FIFO)
  • Implement Source for sai::Rx (DMA can read from RX FIFO)
  • Add SAI DMA MUX source mappings for SAI1/SAI2/SAI3
  • Add channel(), tdr()/rdr() accessors for DMA address setup
  • Add enable/disable_dma_transmit/receive methods (FWDE/FRDE bits)
  • Store data channel index in Tx/Rx structs from split()

Also fix conditional compilation in logging crate to gate lpuart/usbd enum variants on their respective features, and add *.hex to gitignore.

@mciantyre mciantyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks OK. I'll add a CHANGELOG feature entry if you don't get around to it.

Comment thread src/chip/drivers/dma.rs Outdated
Comment thread src/chip/drivers/dma.rs
Comment thread src/chip/drivers/sai.rs
@tacertain

Copy link
Copy Markdown
Contributor Author

Also, I cherry-picked the compilation bug and put it in that separate PR, so I'm going to rebase and force push and see what happens to the PR!

@tacertain tacertain force-pushed the sai-dma branch 2 times, most recently from 6f6fcde to 7695206 Compare March 8, 2026 21:24
Add DMA support for SAI (Serial Audio Interface) transmit and receive:

- Implement Destination<u32> for sai::Tx (DMA can write to TX FIFO)
- Implement Source<u32> for sai::Rx (DMA can read from RX FIFO)
- Add SAI DMA MUX source mappings for SAI1/SAI2/SAI3
- Add channel(), tdr()/rdr() accessors for DMA address setup
- Add enable/disable_dma_transmit/receive methods (FWDE/FRDE bits)
- Store data channel index in Tx/Rx structs from split()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tacertain

Copy link
Copy Markdown
Contributor Author

After a few misfires, I think we're clean!

@tacertain tacertain marked this pull request as ready for review March 8, 2026 21:31
@tacertain tacertain closed this Mar 8, 2026
@tacertain tacertain reopened this Mar 8, 2026
@mciantyre mciantyre merged commit a774416 into imxrt-rs:main Mar 8, 2026
86 checks passed
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 this pull request may close these issues.

2 participants