-1
\$\begingroup\$

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.

  1. Have changed debug setting for connect with pre reset option.

  2. 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.

enter image description here

\$\endgroup\$
4
  • 5
    \$\begingroup\$ Your product is clone. Keil is capable of detecting it. That is all. \$\endgroup\$
    – emre iris
    Commented Mar 19, 2021 at 8:45
  • \$\begingroup\$ But I am not able to understand that official software from STM is working great with the MCU and Keil is not and in some forum people have solved by doing following step that I have mentioned but it's not working for me. \$\endgroup\$
    – Dharmik
    Commented Mar 19, 2021 at 9:02
  • 2
    \$\begingroup\$ stm32cubeide is not ST's original software. It is reconfigured Eclipse-based IDE. There are so many clone products on the field. \$\endgroup\$
    – emre iris
    Commented Mar 19, 2021 at 9:11
  • \$\begingroup\$ I have used stm32 cube programmer, not cubeIDE. it is also not an official ST's? \$\endgroup\$
    – Dharmik
    Commented Mar 19, 2021 at 12:56

2 Answers 2

0
\$\begingroup\$

Try updating the firmware within the ST-Link/V2 device. At first, I got the "not a genuine ST device" error message from Keil MDK when I tried to use an older ST-Link device with a newer STM32H7 chip. Then I used STM32CubeProgrammer to update the firmware in the ST-Link/V2 device. After that, Keil MDK could connect, download and debug on the STM32H7 successfully. My ST-Link/V2 now has firmware version V2J39S7.

\$\endgroup\$
0
\$\begingroup\$

Update your ST-LINK firmware with the ST-LINK utility (you can try STM32CubeProgrammer too, but for older and clone devices it seems that the ST-LINK utilility works better).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.