Hi,
We are trying to run application code on the STM32L151CC starting at 0x08008000. Part of the job of the code is to write to a flash area starting at 0x08024000, but the code freezes when we try this, and the debugger stops working.
The problem appears to be in HAL_FLASHEx_HalfPageProgram. If we comment out the line *(__IO uint32_t*) ((uint32_t)(Address + (4 * count))) = *(pBuffer++); the rest of the code will run fine (without actually flashing of course).
If our application code runs from 0x08000000 there is no problem.
Steve