Code doesn't execute after upload
I am using stm32G031K8 nucleo board. The board was working well, it started to reset itself continuously for some time, I could only see my uart message that says started, every time I erased the code and upload previously working versions. Then it started to not execute code, now I upload led blink project but still doesnt work. I can erase the flash then upload new code.


When I try to debug it, run button is passive at the beginning.

When I press the reset button registers filled with 0xffff.

It cant go to reset handler at the beginning, how can I fix it? Thanks.