2014-09-12 04:43 AM
Hi,
My project crashed during programming of STM32L152 internal flash. Crashing means, that I cannot halt CPU; no hard fault nor bus fault interrupt only CPU freezed. Project runs CMSIS-RTX RTOS. Program is running in a separated area of flash. It is separated in linker file. Flash programming routine (half page write) is running from SRAM. Have anyone an idea what the problem could be? Thanks Zoli #fash-programming #crash2014-09-12 05:04 AM
Getting the MCU into system mode (by setting the BOOT0/BOOT1 pins appropriately while power up) and doing a mass erase (with the Flash Loader Demonstrator software) should fix the problem.
There are several threads around here describing this procedure. However, I never personally tried it on a L15x MCU.2014-09-12 11:15 AM
Thank you for your help. I installed Flash Loader Demonstrator software and erased chip, but not hepled.
However I solved the problem in the meantime. Earlier I already tried to disable interrupt during erasing/programming flash, but didn't work. Then I found, that RTX runs tasks in unpriviledged mode, and couldn't disable interrupt. Switching to priviledged mode and disabling interrupt during flash programming my project got to work.