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!

16 REPLIES 16
TDK
Guru

Some common issues here:

  • Check that BOOT0 is tied low to boot into the user program.
  • Check that board is powered and doesn't have manufacturing issues like cold solder joints.
  • Check power rails.
  • Verify VCAP voltage if present.
  • If code is not working as intended, debug the code by single stepping instructions, inserting breakpoints, and examining where the cpu is at and what it's doing.
If you feel a post has answered your question, please click "Accept as Solution".

Show schematics of your board(s) !

What programmer (HW & SW) are you using, and how do you have it connected ?

How to write your question to maximize your chances to find a solution

I am using an ST-Link and SWD. 

Screenshot 2025-02-17 215641.png

 This is the one I got to flash once and does not work anymore.

I got the flashing working consistently on this type of device. This was also the setup I was working on that would not run after power cycling. Not sure what I did, but it is now working :). It is just getting 3.3V at the power input pins, and I am using 3.3V, GND, SWDIO, SWCLK. I did not change any boot pins

at3_0-1739847725953.png

This one will not connect at all, I have made 2 of these and still no luck. I am not sure what is different other than the capacitors and ferrite bead. 

 

 

 

at3
Associate II

Thank you, I think the main issue now is connecting to the chip on the PCB, not sure what is not working on the board.


@at3 wrote:

I am using an ST-Link


That's not a genuine ST-Link:

https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/tac-p/703663/highlight/true#M965

You didn't answer what software tool(s) you're using.

Again, please read this.

 


@at3 wrote:

This is the one I got to flash once and does not work anymore.


What, exactly, do you mean by "does not work" ?

Does the (unknown)  programmer not connect?

Can you use the debugger?

TDK
Guru

With BOOT0 floating, the microcontroller may boot into flash or into system memory. It is not defined.

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

which should I set it to for programming and for running when connected to power

I am using the Cube programmer. With the stlink I am using, i am still able to connect to chips using the device I mentioned earlier. 

By does not work, I mean that in the cube programmer, it gives some error message, either enable debug authentication or error connecting.


@at3 wrote:

it gives some error message, 


Post the actual message