cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing chip on pcb

at3
Associate II

I am trying to flash a chip on a PCB. Right now I just have it toggle an LED. Sometimes it connects, but does not toggle, only stays lit. After power cycling, it does not even light up, it just stays off. Is there something i am missing, perhaps in the option bits or some clock setting. 

Also, on another board, it is just not connecting, what are some common issues?

Lastly, on third test, it connected a few times. However around a month later, it just won't connect. Any insight?

 

Thanks!

17 REPLIES 17
at3
Associate II

The messages are enable debug authentication or error connecting.

In my test setup with the chip clamp, it is very inconsistent. Sometimes it starts on a power cycle, some times it does not. Right when I plug the stlink into my computer, it starts toggling the led (most of the time). But if i use an external power supply, it works very inconsistently. Also, sometimes I get the debug authentication error on my test setup, but i just unplug the stlink and try again and it works. 

My main question as of now is why sometimes the program runs correctly sometimes, but not at other times

Set BOOT0 low during reset to run user code. Set it high during reset to jump into the bootloader.

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

@at3 wrote:

The messages are enable debug authentication or error connecting.


It's better to copy/paste the actual messages, and/or give a screenshot, rather than try to paraphrase or summarise.

 


@at3 wrote:

In my test setup with the chip clamp, it is very inconsistent.


That is in the nature of those things - they are notoriously unreliable!

Did you follow @TDK's advice about BOOT0 and other things to check ?

It seems that the boot0 pin was the issue, it now consistently works

 

I am still unsure on the issue for the PCB. Even if the boot is floating, it should at least connect, right?

at3_0-1740001455089.png

 

You've configured the CubeProgrammer to connect under Hardware reset, but there is no NRST in your debug header.

Add NRST to your debug connection, and try again ...

 

See also:

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693

I tried that earlier, no luck with that. Also, with those same settings, I was able to connect to the chip in the clamp (without the reset) using only 3.3V, GND, SWDIO, SWCLK

Ok, that makes sense. Are there any practices I should avoid or adhere to to ensure that it works this time?