diff options
author | Bdale Garbee <bdale@gag.com> | 2014-02-13 21:54:46 -0700 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2014-02-13 21:54:46 -0700 |
commit | e77c24aaaff12669ca6970dfcca770671387f59c (patch) | |
tree | c8929f4a71290e3a3c3b6d717788ae1837b2dffa /src/stm/ao_flash_stm.c | |
parent | 85974eadfde6103d297498ee8c4268e28ab008ba (diff) | |
parent | bf268354535a3a7b2e093235e5347ed2a6d809ff (diff) |
Merge branch 'branch-1.3' into debian
Diffstat (limited to 'src/stm/ao_flash_stm.c')
-rw-r--r-- | src/stm/ao_flash_stm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stm/ao_flash_stm.c b/src/stm/ao_flash_stm.c index 38b1c2d8..39dc8144 100644 --- a/src/stm/ao_flash_stm.c +++ b/src/stm/ao_flash_stm.c @@ -83,12 +83,14 @@ _ao_flash_erase_page(uint32_t *page) void ao_flash_erase_page(uint32_t *page) { + ao_arch_block_interrupts(); ao_flash_pecr_unlock(); ao_flash_pgr_unlock(); _ao_flash_erase_page(page); ao_flash_lock(); + ao_arch_release_interrupts(); } static void __attribute__ ((section(".ramtext"), noinline)) @@ -116,6 +118,8 @@ ao_flash_page(uint32_t *page, uint32_t *src) uint8_t h; ao_flash_erase_page(page); + + ao_arch_block_interrupts(); ao_flash_pecr_unlock(); ao_flash_pgr_unlock(); for (h = 0; h < 2; h++) { @@ -124,4 +128,5 @@ ao_flash_page(uint32_t *page, uint32_t *src) src += 32; } ao_flash_lock(); + ao_arch_release_interrupts(); } |