Skip to main content
Associate III
April 26, 2024
Question

Target unknown error 19

  • April 26, 2024
  • 2 replies
  • 1516 views

Target unknown error 19

Error in initializing ST-LINK device.

Reason: Unknown. Please check power and cabling to target. 

 

how to clear the above error, please reply immediately in urgent base to clear the above error

    2 replies

    Andrew Neil
    Super User
    April 26, 2024

    You need to give more context:

    • What STM32CubeIDE version?
    • What is your target?
    • When, exactly, does this occur?

     


    Reason: Unknown. Please check power and cabling to target


    So did you do that?

     

     


    @sreedharan1196 wrote:

    please reply immediately in urgent base to clear the above error


    http://www.catb.org/~esr/faqs/smart-questions.html#urgent

     

     

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Associate III
    April 26, 2024
    • What STM32CubeIDE version?  -  1.15.0
    • What is your target? - stm32l051c8t7 - using stlink
    • When, exactly, does this occur - after uploading the code

    So did you do that? - yes done

    Andrew Neil
    Super User
    April 26, 2024

    @sreedharan1196 wrote:
    • What is your target? - stm32l051c8t7 - using stlink

    More details needed: is that an ST board, or your own custom design.

     

    you'll get better help more quickly by providing full details up-front - rather than having to pull them incrementally from you.

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Visitor II
    August 28, 2024

    This error could be caused by a misconfiguration of the communication pins between the STM and the ST-Link or because the microcontroller is in deep sleep mode.

    1. Check your .ioc file and go to System Core -> SYS -> Serial Wire.
    2. If these settings were disabled, it means the STM can't communicate with the ST-Link. Alternatively, the issue might be that the microcontroller was programmed to enter deep sleep mode.
    3. In both cases, the solution is the same: you need to connect through STM32CubeProgrammer. Set the connection mode to "Under Reset" and perform a "Full Chip Erase" to clear the flash memory.

    After doing this, you should be able to program the STM without any issues.

    If you still can't connect the device even after configuring it in "Under Reset" mode, the problem might be with the ST-Link itself—possibly because it's not an original one. Personally, I used a programmer from a Nucleo board, and that worked fine for me.