cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to avoid FLASH_Erase() stall on stm32f103?

tedmosby
Associate
Posted on December 08, 2011 at 20:04

Hi,

I'm using ADC with DMA and periodically erasing the flash pages. But the dma interrupt is not fired while i'm erasing the flash pages. I'm also using a lot of flash constants in my code.

Is it possible to avoid flash stall with the given MCU, which has a single bank flash?

any help is sincerely appreciated!

ted

#flash-erase-stall-stm32f103
3 REPLIES 3
Posted on December 08, 2011 at 22:53

Is it possible to avoid flash stall with the given MCU, which has a single bank flash?

Yes, you have to run entirely from RAM, if you touch the flash array it will stall. There is the same problem with the F2 and F4 series. You might want to check if any of the F1 1 or 2 MB models have multiple banks/planes.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
trevor23
Associate III
Posted on December 09, 2011 at 00:42

Do the models that have multiple banks/planes allow you to erase one bank/plane while running from the other without stall?

Posted on December 09, 2011 at 03:44

Do the models that have multiple banks/planes allow you to erase one bank/plane while running from the other without stall?

 

ST calls them banks, but they have separate controllers, and as far as I understand it, they act independently. So yes, if you don't touch an active bank with a read/fetch then the CPU will not stall.

From http://www.st.com/internet/com/press_releases/p2478.jsp

''The 1MB Flash memory is organized in two banks of 512Kbytes.This dual-bank architecture thereby enables safe upgrading of applications in the field by uploading new software into the second memory bank. The update can then be copied across safely into the main bank, and the process managed to protect against hazards such as power loss while the upgrade is being applied.''

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..