Skip to main content
Visitor II
December 20, 2023
Question

Could not halt device (19)

  • December 20, 2023
  • 3 replies
  • 5179 views

Hi,

I am trying to program STM32F030C8T6 with STM32CubeIDE. When I try to upload the code, it says the download was successful but then it fails to halt the device. I have tried setting "Reset behaviour" to "None" as other posts have suggested, but that only results to me getting another error with an unknown reason and it telling me to check power and cabling. I have done so, 5 times already and I have measured every part of the circuit with my multimeter. Everything is connected. What I find weird is that a week ago it was working fine. Only as I expanded the firmware by an order of magnitude, it stopped working.  What could I do to get rid of this error?

Best regards,

Juhani

 

-------------------------------------------------------------------

STM32CubeProgrammer v2.14.0

-------------------------------------------------------------------

 

 

 

Log output file: C:\Users\Juhani\AppData\Local\Temp\STM32CubeProgrammer_a12652.log

ST-LINK SN : 38FF6B06304E4B3038591243

ST-LINK FW : V2J42S7

Board : --

Voltage : 3.17V

SWD freq : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x440

Revision ID : Rev 2.0

Device name : STM32F05x/F030x8

Flash size : 64 KBytes

Device type : MCU

Device CPU : Cortex-M0

BL Version : 0x21

 

 

 

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a12652.srec

File : ST-LINK_GDB_server_a12652.srec

Size : 13.38 KB

Address : 0x08000000

 

 

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 13]

Download in Progress:

 

 

File download complete

Time elapsed during download operation: 00:00:00.947

 

 

 

Verifying ...

 

 

 

 

Download verified successfully

 

 

Could not halt device (19)

Target is not responding, retrying...

Target is not responding, retrying...

Shutting down...

Target is not responding, retrying...

Target is not responding, retrying...

Failed to read register cache

Target is not responding, retrying...

Target is not responding, retrying...

 

After this the LED on the ST-LINK/V2 lights up orange, which I know means communication failed.

 

 

    This topic has been closed for replies.

    3 replies

    Super User
    December 20, 2023

    1. set  "Reset behaviour" to "under reset" or software system reset .

    2. is this checked , as in pic.below,  in menu->debug config.->

    AScha3_0-1703084147044.png

     

    JS8Author
    Visitor II
    December 20, 2023

    Hi, 

    Reset behaviour is already set to "Connect under reset".

    I am not sure what you mean by "this", but all seems to match with my settings in your image.

    Thanks for the response.

    Super User
    December 20, 2023

    > what you mean by "this"

    = everything , thats checked. :)

    ok, so it not stops after download at main ?

    You have another F030 to compare ? 

    Maybe is damaged, because you wrote: it was working before - before "what" ?

    Now try to make a new (empty or small) project and try to debug this, then we see, is chip still ok or not.

    Visitor II
    September 24, 2024

    I just encountered a similar situation, unable to stop the device (18). You may need to check the code problem. It may be that some IO ports have serious conflicts.

     

     

    This post has been translated from Chinese to comply with the ST Community guidelines.

     
     
    Graduate
    March 12, 2025

    OK OK OK!

    I solved this problem!
    Shorten the usb length of stlink.
    And try connecting directly without using usb hub!