cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect debugger/programmer.

LMehm
Associate III

Hello,

We programmed our STM32L011 microcontroller with firmware that enters STOP mode and waits for an interrupt.

However, we accidentally disabled the interrupt on the PA4 line. As a result, the device now immediately enters STOP mode, and we are unable to reprogram it.

Could you please advise how we can recover the device in this situation?

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Super User

This is where it pays to include NRST in your debug connection - connecting under hardware reset would get you out of this state.

Do you have access to BOOT0 ?

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.

View solution in original post

10 REPLIES 10
AScha.3
Super User

Hi,

>We programmed our STM32L011

How ?

-- using a st-link on swd/swc ?    So just connect with CubeProgrammer and set mode : under reset + hardware reset.

If you feel a post has answered your question, please click "Accept as Solution".
Andrew Neil
Super User

This is where it pays to include NRST in your debug connection - connecting under hardware reset would get you out of this state.

Do you have access to BOOT0 ?

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.

We are using ST-Link V2 and protocol is SWD.


@LMehm wrote:

We are using ST-Link V2 


But have you connected NRST to it?

Is it a genuine one ?

How to recognize a genuine ST-LINK/V2 versus a cloned one

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.

We don't have access to BOOT0 pin.

So what about NRST ?

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.

Yes NRST is connected but Under reset mode didn't help.


@LMehm wrote:

We don't have access to BOOT0 pin.


You said you "fixed" your previous problem by connecting it to ground.

So you could just remove that connection ?

Correction: You disabled it with option bytes.

The following still applies:

Rather than hard-wire it to ground or disable it with option bytes, a better approach would be to use a pull-down resistor - then you would still be able to pull it up when required ...

 

 

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.

We succeeded using Connect under reset mode.

Thank you!