cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32f042f6 - 'funny' problem with programming

oeliks
Senior

Hi! Just as a comment, did anyone had that kind of problem?

uC is not found or easily losing connection while erase/program.

Everything is properly designed and soldered (even programmer pins are temp. soldered to board).

Every connection was checked and re-checked.

But this chip just will lost connection. Unless. I apply a pressure to top of its case.

A assumed bad design and poor soldering with first chip but after re-check (microscope, DMM etc.) and with next chip also behaving in the same manner - it just seems like the bad connection is internal in chip?

 

Is it even possible?

 

There is no problem with other pins (usb connection ect.)

Ps. second chip was treated like an egg and soldered by hand with caution.

Never had that kind of problem before, it really looks like bad solder, but no ...

:)

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief III

Hi,

You changed the chip , ok, but still same board ?

Because last year a colleague had similar effect and could not find the reason. So i said, ok i look and if i can't find the cause either, we'll throw it away.

When I searched around with the probe of the DSO, suddenly i got same effect. It was a resistor with a micro-crack , near the cpu. Little pressure on the chip was enough to get the cpu running/debug normal , so it seemed to be a problem in the cpu . Really funny (thats how i found it) was, when testing the smd resistor with a DMM, the pressure from the tips was enough, to close the crack and so it showed the right resistance value ! Even under the microscope nothing was visible.

I said: replace this resistor and tell me what it does then. -> No more funny behavior .

Maybe you also have a cer-cap or resistor with such a clever crack . :)

Try pressing gently on all caps and resistors around with a plastic tip.

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

View solution in original post

11 REPLIES 11
TDK
Guru

> Is it even possible?

The odds that the bad connection is internal to the IC, rather than being on the external pins, or the PCB, are truly infinitesimal. Keep in mind these chips are checked before they are sent out with automated test equipment.

I have had cracked vias on the PCB cause intermittent connections like this, but even that is a stretch. Typically, there's a cold solder joint somewhere that may look like it's okay at first glance.

Loss of connection typically means:

  • Loss of voltage causing chip reset.
  • Poor connections. between chip and programmer (bad solder joints, intermittent connections, etc.)
  • Chip going into sleep or other low-power state.
  • SWD pins (SWDIO and/or SWCLK) being re-purposed by the currently running program.
If you feel a post has answered your question, please click "Accept as Solution".

Well I have over 25 years of soldering experience (if that counts ;) ) and things that were way more fragile and not that big as this chip. Traces to SWD pins are short and on the same layer as pins - for conviniance. I didn't even use a connector - dead solder good quality short wires to the bord and to programmer.

This was my first guess also - so I made some effort to exclude this possibility (of bad chip-board solder connection, beoken traces etc.).

 

Power is stable, and even monitored by cube programmer. Scope shoved no blip on this line.

Didn't use sleep mode at all with this chip.

SWD pins are used only for SWD and are not repurposed by program.

 

The only difference with working/not working swd was pressure on plastic case.

 

Chips bought from official reseller, not that cheap either, so I think they are not fake.

Yeah, weird. What programmer are you using? Does it happen regardless of SWD frequency? Solid GND connection between all relevant parts? When connection is lost, does the chip reset? (NRST will go low on internal resets.)

Post if you figure it out.

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

Programmer that I use is V3E-minie.

It happens regardless of frequency.

Solid GND connections without ground loops.

The same thing happens when programming under reset.

 

 

Didnt check actual nrst state or blips yet.

gbm
Lead III

Check the schematic for the connection of BOOT0 pin. If your program misconfigures SWD, the chip connects to a programmer only if BOOT0 is detected as high. If BOOT0 is floating - touching the chip changes it's input state.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
AScha.3
Chief III

Hi,

You changed the chip , ok, but still same board ?

Because last year a colleague had similar effect and could not find the reason. So i said, ok i look and if i can't find the cause either, we'll throw it away.

When I searched around with the probe of the DSO, suddenly i got same effect. It was a resistor with a micro-crack , near the cpu. Little pressure on the chip was enough to get the cpu running/debug normal , so it seemed to be a problem in the cpu . Really funny (thats how i found it) was, when testing the smd resistor with a DMM, the pressure from the tips was enough, to close the crack and so it showed the right resistance value ! Even under the microscope nothing was visible.

I said: replace this resistor and tell me what it does then. -> No more funny behavior .

Maybe you also have a cer-cap or resistor with such a clever crack . :)

Try pressing gently on all caps and resistors around with a plastic tip.

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

BOOT0 tied to gnd via resistor and also disabled by option bits. Package is tssop so only BOOT0 is present at pins. So it shoid correspond to flash region.

:)

Yes, this sound possible, and now I can remember couple situations from the past where cracked cer-cap was causing problems, and I know that it can sometimes be not visible on microscope either.

But these were old caps.

This parts are brand new. And tested on board.

The board is custom, and its another board. But these smd components arent tested as good as uC, so its a posibility for sure!

 

I will check it!

oeliks
Senior

Yes this was it ! These resistors are covered only on top, and I tested not used, not heated parts and saw some problems. It seems that top layer dont have good connection to pad on this part. So bending it slighly make them work, partially work or dont work at all.

 

When part was tested on bord it seemed ok because the pressure from DMM leads.

 

Thanks!