From bc7ed47b7b3a23292942b4f052fa6498b156b867 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Wed, 16 Sep 2020 17:28:22 +0200 Subject: [PATCH] Add TX DMA implementation for SPI3 DMA2 channel 2 was selected after referring to the "DMA request mapping" section of the reference manual (section 13.3.7). Tested locally with a large number of LEDs and works well. --- CHANGELOG.md | 5 +++-- src/spi.rs | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50fa588d..72cb98fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,8 @@ MonoTimer now takes ownership of the DCB register ### Fixed -- Fix MonoTimer not working in debug mode. +- Fix MonoTimer not working in debug mode. +- Add missing TX DMA implementation for SPI3. ## [v0.6.1] - 2020-06-25 @@ -24,7 +25,7 @@ MonoTimer now takes ownership of the DCB register ### Fixed - Fix wrong frequency reported by `MonoTimer` -- Fix wrong timings generated by `Timer::syst` +- Fix wrong timings generated by `Timer::syst` - Fix period retrieval for timers ### Changed diff --git a/src/spi.rs b/src/spi.rs index 9a4c8359..f57ad4da 100644 --- a/src/spi.rs +++ b/src/spi.rs @@ -41,6 +41,7 @@ use crate::pac::{SPI1, SPI2}; use crate::afio::MAPR; use crate::dma::dma1::{C3, C5}; +use crate::dma::dma2::C2; use crate::dma::{Static, Transfer, TransferPayload, Transmit, TxDma, R}; use crate::gpio::gpioa::{PA5, PA6, PA7}; use crate::gpio::gpiob::{PB13, PB14, PB15, PB3, PB4, PB5}; @@ -498,3 +499,4 @@ macro_rules! spi_dma { spi_dma!(SPI1, C3); spi_dma!(SPI2, C5); +spi_dma!(SPI3, C2);