Flash erase function need to be called multiple times now
We have a project that works just fine using STM32L071RBT (compiler 5.0.6 build 960). As part of the project we erase a portion of the flash and then reprogram it for the fota, which again works great.
I then branched the project to make another variation, removed some code to make room, and added some code. And this works great right up until we run the same erase routine... When we try to run HAL_FLASHEx_Erase(), it fails the first time on FLASH_WaitForLastOperation() with the only flag being FLASH_FLAG_EOP, but works if the function is called a second time
I'm assuming that I deleted something that we need, but have scoured my code and for the life of me cannot find what it could be. The build configurations are identical, and the old code still builds and works fine. The new code functions, but I'm finding it concerning that previously functioning code that has stopped working, and would like to get to the bottom of it.
Yes, I've already googled anything and everything I can think of, haven't found anything helpful
No, I can't upload my project, propriety and whatnot
If anyone has any thoughts as to what the problem might be, it would be greatly appreciated!
