Skip to main content
Visitor II
February 5, 2020
Question

INot a genuine st device. Abort connection

  • February 5, 2020
  • 9 replies
  • 3540 views

I use an STM32F7805-DK and a Keil IDE and have been working well for a month. Suddenly, I get Not a Genuine ST Device. I installed Keil on a second computer and bought a 2nd STM32F7805-DK but get the same result. What can I do... the drivers on the PCs are up to date, brand new STM32F7805-DK board...?

    This topic has been closed for replies.

    9 replies

    Super User
    February 5, 2020
    Graduate II
    February 5, 2020

    Can you see with ST-LINK Utilities or STM32 Cube Programmer tools

    Go into the Debugger Settings, and perhaps reduce the connection speed, or connection options

    ST-LINK firmware https://www.st.com/en/development-tools/stsw-link007.html

    Should be 2.36 now, but older versions are available

    DRobe.4Author
    Visitor II
    February 6, 2020

    I should add one clarification. When I received the 2nd STM32F7508-DK, I tried it out on the original (and only existing Keil IDE/PC at the time) and the new board did get programmed.... but then I couldn't reprogram it with another version of code, so I developed my second IDE/PC and I could not reprogram the board there. Maybe the act of programming the new board on my first IDE/PC setup damaged the board, but there is no evidence on the PCB.

    At your suggestion, I downloaded the Link007 and tried to set the link to the newest standards. As you can see in the first two pictures in the attached Word file, the process worked. When I once again loaded the Keil IDE and pressed Load, the process failed as seen in the last 3 pictures of the Word file. I then decreased the ST_LINK COM frequency from 10 to 2 MHz.

    I should also say that on the first IDE/PC system, in desperation I tried to use the STM32 Cube Programmer and got a whole series of messages while trying again and again.. e.g. DEV_TARGET_NOT_HALTED, DEV_TARGET_HELD_UNDER_RESET.

    DRobe.4Author
    Visitor II
    February 8, 2020

    No one is replying and my project is halted and I have bought two expensive Discovery Kits and wasted a lot of time.

    Therefore, in an effort to redeem this situation, let me ask a question:

    Is there a way to bypass the ST_LINK installed on my Discovery Kit and try to control the board from an external ST_LINK? The STM32F7508 still works, either partially or wholly, because I can see that it has interacted with the display. I still do not understand what has gone wrong, but maybe it is entirely in the ST_LINK portion of the board.

    Also, is it possible (faint hope) that ST would be interested in trading the boards for new ones so that they can analyze what has gone wrong and figure out a way of preventing it from happening to other customers?

    Visitor II
    February 8, 2020

    Do you have in the code some low power SW scheme such as clock stop modes?

    To check if the debugger works, tap the boot0 pin and force the other level and do a reset (push button).

    This will force the STM32 to go to bootloader mode instead of a possible deadlocked user SW. (if there is a bug which makes the code crazy, the STLink maynot be able to activate the debug mode.

    Also, once you did this, make sure the STLink dbeug configuration is using HW Reset control.

    Visitor II
    February 8, 2020

    And for sanity check Vdd MCU, Reset level, boot level if you have an oscilloscope.

    Advice: In your code, at the beginning of main, put a delay of 2+ seconds to the STLink can try to go debug mode before the user code migth behave badly.

    I usually do an LED animation on custom boards.

    DRobe.4Author
    Visitor II
    February 12, 2020

    Thank you SO MUCH. The original board started working after I set Connect Under Reset. It was in the Normal setting previously and worked for a month. Who knows what happened? But just changing that one setting made it work. Thank you so much. I will buy you a Coke if I ever meet you face to face. I will try the second (almost new) board shortly, but am optimistic.

    Super User
    February 13, 2020

    @DRobe.4​ Do you use the Keil "free" version for STM32?

    -- pa

    DRobe.4Author
    Visitor II
    February 13, 2020

    Yes. I want the code to fit in 64KB flash of the STM32F7508, so 32KB code size limitation of the free IDE is in the same ballpark. If I change my requirements, I will switch to another IDE.

    Super User
    February 14, 2020

    This is interesting. So, Keil silently expanded their free STM32 Cortex M0 offering to automatically behave as "Lite" with F7.

    That's, it works with F7, but limits code to 32 KB like MDK Lite.

    Their debugger checks for STM32 and this check is not very reliable.

    All problems come from bad, greedy capitalists that do not let software be free!

    DRobe.4Author
    Visitor II
    February 15, 2020

    As far as I know, the Lite version works with many processors, not just F7, and in all of its applications, the Lite version restricts code size to 32 kB. There is no way that I can afford to spend many thousands of $ for the full version of MDK 5, so I am happy to use the free version, even if it has a code size limitation. Keil is, as far as I know, not a charity, so somebody has to pay for their IDE. There are many free IDEs that are funded by companies to promote purchase of their CPUs, but Keil is not one of them. I think that my problems were not related to unreliability of Keil. In fact, the reason that I am using it, rather than the GCC-based free IDEs, is that I like Keil better. People who are grateful for what they have in life live longer than people who are critical.... just a hint.

    Visitor II
    February 29, 2020

    Re: Not a Genuine ST Device. Abort connection.

    I have been using a STM32F103C8T6 based "bluepill" module with the free Keil microvision 5 version with no issues.

    Recently, while programming a new module (bluepill), I got the above message. However after dismissing the message, the upload process went right ahead and voi la, - a perfectly working module!

    Can anyone shed any light on this curious working of Keil.

    Regards.