I am using ST-link V2 for programming/ debugging my STM32F103C8t MCU using Keil.
So the problem is that when I try to program the STM32 controller it shows a popup error Not a genuine ST Device! Abort connection
And Keil is not programming the controller. So I have tried different software.
STM32 Cube programmer is detecting my controller successfully with the same ST-link and also have successfully uploaded the compiled hex file from the Keil using STM32 cube programmer and it's working. Also, I have tried it with ST-Link utility and it also detects successfully and also uploaded the program perfectly. So I think my ST-link V2 and controller are working fine.
But there is some setting I am missing in Keil so after a lot of searching in different forms I have tried the following things that did not help.
Have changed debug setting for connect with pre reset option.
Have tried different frequencies and right now I am low to 10Mhz.
Adding my Keil debugger setting snap if help to figure out what's going on. I am able to program my controller with different software but not with Keil. Any help will be appreciable as it's making me mad each time compiling code in Keil and for testing going to different software for uploading and the main thing I have to trick the Keil for false uploading to get inside debugging mode.
Thank you in advance for your help.