Skip to content

Commit

Permalink
Add TX DMA implementation for SPI3
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mitchmindtree committed Sep 16, 2020
1 parent d976ba2 commit bc7ed47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -498,3 +499,4 @@ macro_rules! spi_dma {

spi_dma!(SPI1, C3);
spi_dma!(SPI2, C5);
spi_dma!(SPI3, C2);

0 comments on commit bc7ed47

Please sign in to comment.