WFI() issue using Nucleo STM32G031K8 and uVision.
Hi together,
I’m trying to start a new project using STM32G031. The final decision of the MCU isn’t made yet and therefore I’m currently testing the possibilities with the Nucleo STM32G031K8 board. I’m using the onboards USB debug interface.
I start a new Keil uVision project and everything work as expected until I add WFI() at the end of my main loop. After adding it, I start a debug session and everything is fine. But after leaving this first debug session and trying to start it second one again, I got the error message “Invalid ROM table�?.
From that point it’s not possible to debug or even flash the MCU using uVision. I have to copy a hex file (strange that it’s the same source) using the storage bootloader and after that it’s possible to start a new debug session. Unfortunately with the same result, that after leaving it and trying to debug again, I got this error message.
I’m checked all ideas and tips I found here, check different “Connect and Reset Options�? because this looks to solve the “Invalid ROM table�? error for some other users, but had no success.
All programs and interfaces are updated to the current version. Currently I’m reading about DBGMCU_CR register options but I’m not using standby or stop mode so I don’t think this will change the situation. At the moment, this register is in init state.
A second strange thing is, that the same situation occurs if I use an example software provided by ST. If I use
STM32Cube_FW_G0_V1.4.0\Projects\NUCLEO-G031K8\Examples_LL\PWR\PWR_EnterStandbyMode
and delete “ LL_LPM_EnableDeepSleep();�? in line 273, I got the same result.
Maybe there is a clock or interrupt issue. Currently I’m using HSI.
Does anybody have an idea or hint where to start? Sure, I can try to switch off WFI() in debug mode, but this is only a quick & dirty fix.
I’m happy about any idea. Thank you so much.