aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f7/src
diff options
context:
space:
mode:
authorRasmus Melchior Jacobsen <[email protected]>2023-04-05 10:55:31 +0200
committerRasmus Melchior Jacobsen <[email protected]>2023-04-05 10:55:31 +0200
commit2a49e11cb0ffd3e0d9a0cc94444f293de523b47f (patch)
treed5d415fd27d7507107fc89a6d45ec46b49dc4f6c /examples/stm32f7/src
parent57d3d4d58148fefbd6db4770918b52f31ded0124 (diff)
Align flash examples
Diffstat (limited to 'examples/stm32f7/src')
-rw-r--r--examples/stm32f7/src/bin/flash.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f7/src/bin/flash.rs b/examples/stm32f7/src/bin/flash.rs
index 4a7bca1fa..aabfe8557 100644
--- a/examples/stm32f7/src/bin/flash.rs
+++ b/examples/stm32f7/src/bin/flash.rs
@@ -14,12 +14,12 @@ async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default()); 14 let p = embassy_stm32::init(Default::default());
15 info!("Hello Flash!"); 15 info!("Hello Flash!");
16 16
17 const ADDR: u32 = 0x8_0000; 17 const ADDR: u32 = 0x8_0000; // This is the offset into the third region, the absolute address is 4x32K + 128K + 0x8_0000.
18 18
19 // wait a bit before accessing the flash 19 // wait a bit before accessing the flash
20 Timer::after(Duration::from_millis(300)).await; 20 Timer::after(Duration::from_millis(300)).await;
21 21
22 let mut f = Flash::new(p.FLASH); 22 let mut f = Flash::new(p.FLASH).into_regions().bank1_region3;
23 23
24 info!("Reading..."); 24 info!("Reading...");
25 let mut buf = [0u8; 32]; 25 let mut buf = [0u8; 32];