0

I have MCU STM32F415xx and was trying to write on internal flash. But for reason I don't know PGPERR and PSGERR flags were turning on in random time (as I found, problem can be found anywhere in HAL libraries) and HAL functions were stopping. I turned out flags checkout in FLASH_WaitForLastOperation. And after that MCU is not responding on any try to connect. Reference manual says, that if this flags are on, flash operations just will not be performed, but my MCU is not working and I cannot connect to it with ST-LINK Utility (and Programmer as well) even with reset pin. So what could happen and is there any way to reanimate my MCU?

lazba
  • 129
  • 9
  • You're probably going to have to give some code snippet to find out the problem. Also what editor are you using? Keil uVision, mbed.org? – Pieterjan Nov 01 '22 at 08:57
  • Keil. What code snipped can I give? I've used code similar to [this][https://controllerstech.com/flash-programming-in-stm32/] but entering sector number initially, and using it beggining as write address – lazba Nov 01 '22 at 09:08
  • Such behavior is sometimes triggered by error in some other part of your code, e.g. stack overflow leads to erroneous write to flash region. – Flexz Nov 01 '22 at 09:18
  • I saw such a variant in some questiion about flash writing on f4, but I wasn't doing anything, that could cause this – lazba Nov 01 '22 at 11:13
  • Also now problem is MCU that not responding, and I want to know if I can fix it – lazba Nov 01 '22 at 11:29

0 Answers0