aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-03-29 19:57:58 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-03-29 19:57:58 +0300
commitd1af5a24303a036cc2ede7e7c3c0c7b0036016e7 (patch)
tree7e724efed7877ae3687568cc019525a3c3db12be /Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
parenta5e9811e9fffedb86741a8af02f6cc4e1d899f36 (diff)
downloadTango-d1af5a24303a036cc2ede7e7c3c0c7b0036016e7.tar.gz
Tango-d1af5a24303a036cc2ede7e7c3c0c7b0036016e7.zip
evb support + inlock on flash actions
Diffstat (limited to 'Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c')
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
index 240585e43..5daec00ed 100644
--- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
+++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
@@ -104,7 +104,9 @@ uint32_t ReadAppAndProgram(uint32_t ui32FlashStart,uint32_t ui32FileSize,void* b
// block passed to the flash function must be divisible by 4.
//
- status = FlashProgram((uint32_t *)ui32BufferAddr, ui32ProgAddr,(ui32DataSize + 3) & ~3);
+ ROM_IntMasterDisable();
+ status = ROM_FlashProgram((uint32_t *)ui32BufferAddr, ui32ProgAddr,(ui32DataSize + 3) & ~3);
+ ROM_IntMasterEnable();
if (status)
Report("FlashProgram Error", __FILE__,status,ui32ProgAddr , RpMessage, (ui32DataSize + 3) & ~3, 0);
@@ -161,9 +163,11 @@ void FlashInit(void)
if (RxIndex++>=MAX_CONT_LOG)
RxIndex = 0;
#endif
+ ROM_IntMasterDisable();
for(ui32Idx = FLASH_RAM_BASE; ui32Idx < FLASH_RAM_BASE+FLASH_SIZE; ui32Idx += 1024)
{
FlashErase(ui32Idx);
}
+ ROM_IntMasterEnable();
}