‎2023-04-08 01:43 AM - edited ‎2023-11-20 08:43 AM
I have made a small/simple circuit with an STM32L431, where I first made a prototype version on a breadboard and then had the same circuit manufactured on a custom PCB:
The breadboard edition works exactly as expected. The PCB edition however is acting up.
I'm supplying power and measuring current with a Nordic semiconductor PPK2. Both MCUs have been programmed with the same program that goes into an endless loop.
This is what the current looks like in the breadboard prototype edition:
And PCB:
I can connect my stlink to the target just after powering it up, but once the current starts to spike I lose the connection.
I've measured the NRST pin with a scope and it seems to always be high.
Any ideas for what could cause this?
‎2023-04-08
06:03 AM
- last edited on
‎2023-12-06
04:43 AM
by
Laurids_PETERSE
...open cmos inputs...
try:
‎2023-04-08 03:02 PM
The circuit is a little bit strange:
‎2023-04-08 11:44 PM
Does not seem to make any difference unfortunately.
‎2023-04-08 11:46 PM
Fair points, but I think there's something else wrong as I've currently only mounted the MCU and decoupling capacitors and I'm still seeing the same issue. I'm really at a loss, but I'm clearly doing something wrong. :grinning_face_with_sweat:
‎2023-04-09 12:00 AM
so make R1 470 r ; switch pullup or -down ON for all inputs (to NRF, switch etc.);
i see no ground-plane - is there on bottom side ??
btw
this kind of "noise" is typical for open/floating input or a bad contact/solder joint. control this again...
‎2023-04-09 05:57 AM
On the other side it's also strange that your breadboard is working at all without any decoupling capacitors etc. Are you sure that this is working correct or does it stay in a constant reset/sleep state (without any change in current consumption)?
For your custom PCB I would suppose a problem in routing, soldering or other hardware problem (e.g. damaged or fake MCU).
First seconds of your current diagram seems to be ok and constant.
Are there any peripherals initialized during startup? Please set a breakpoint to main entry point, step the initailization functions and monitor the current. There you can see if any peripheral causing problems (e.g. switch GPIO output to short circuit against GND or VDD).
Also observe if the MCU is heating up strongly...
‎2023-04-09 09:02 AM - edited ‎2023-11-20 08:43 AM
The breadboard MCU is decoupled same as the PCB, as close as I could get the capacitors to the MCU, they were just hidden on the other pic:
I've worked with it for a while and never had any problems with connecting STLink or any observation in regards to current that I couldn't explain. So I've put it into standby mode and seen the current go low, awoken it by button push and seen it go higher again for a while before going back to standby and so on. I'm pretty sure it works as it should.
I think it sounds likely that it's the soldering. I think I will retry that tomorrow with fresh components.
‎2023-04-09 09:05 AM - edited ‎2023-11-20 08:43 AM
I tried carefully going over every solder joint under a microscope, cleaned with IPA and let it dry before powering it up again, but it seems I made it even more mad:
It won't talk to me at all over SWD now.
Let me try with new components tomorrow and report back.