Skip to content

Commit

Permalink
Successfully build all examples for RM0455 devices
Browse files Browse the repository at this point in the history
  • Loading branch information
richardeoin committed Aug 18, 2021
1 parent 33e0226 commit f010435
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Changed I2S constructors to take less arguments

* MSRV increased to 1.51.0
* Rename the PeripheralREC object for BDMA2 on 7B3, 7B0, 7A3 parts from BDMA to BDMA2

## [v0.10.0] 2021-07-xx

Expand Down
5 changes: 4 additions & 1 deletion examples/i2c4_bdma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ fn main() -> ! {
let dp = pac::Peripherals::take().expect("Cannot take peripherals");

// Run D3 / SRD domain
#[cfg(not(feature = "rm0455"))]
dp.PWR.cpucr.modify(|_, w| w.run_d3().set_bit());
#[cfg(feature = "rm0455")]
dp.PWR.cpucr.modify(|_, w| w.run_srd().set_bit());

let pwr = dp.PWR.constrain();
let pwrcfg = example_power!(pwr).freeze();
Expand Down Expand Up @@ -84,7 +87,7 @@ fn main() -> ! {
#[cfg(feature = "rm0455")]
let streams = StreamsTuple::new(
dp.BDMA2,
ccdr.peripheral.BDMA.low_power(LowPowerMode::Autonomous),
ccdr.peripheral.BDMA2.low_power(LowPowerMode::Autonomous),
);

let config = BdmaConfig::default().memory_increment(true);
Expand Down
2 changes: 1 addition & 1 deletion src/rcc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ impl Rcc {
});
#[cfg(feature = "rm0455")]
rcc.srdcfgr.modify(|_, w| unsafe {
w.d3ppre() // D3 contains APB4
w.srdppre() // D3 contains APB4
.bits(ppre4_bits)
});

Expand Down

0 comments on commit f010435

Please sign in to comment.