File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ fn main() -> ! {
20
20
if let Some ( mut p) = pac:: Peripherals :: take ( ) {
21
21
let _ = p. RCC . configure ( ) . freeze ( & mut p. FLASH ) ;
22
22
23
- const OFFSET_START : u32 = 32 * 1024 ;
24
- const OFFSET_END : u32 = 33 * 1024 ;
23
+ // All examples use the first 16K of flash for the program so we use the first page after that
24
+ const OFFSET_START : u32 = 16 * 1024 ;
25
+ const OFFSET_END : u32 = OFFSET_START + 1024 ;
25
26
// Unlock flash before writing
26
27
let mut unlocked_flash = p. FLASH . unlocked ( ) ;
27
28
28
- // All examples use the first 16K of flash for the program so we use the first page after that
29
29
NorFlash :: erase ( & mut unlocked_flash, OFFSET_START , OFFSET_END ) . unwrap ( ) ;
30
30
31
31
// Write some data to the start of that page
You can’t perform that action at this time.
0 commit comments