cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L431 strange current draw

SKjær.1
Associate II

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:


_legacyfs_online_stmicro_images_0693W00000bhkSAQAY.png 

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:


_legacyfs_online_stmicro_images_0693W00000bhkS0QAI.png 

And PCB:


_legacyfs_online_stmicro_images_0693W00000bhkRqQAI.png 

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?

8 REPLIES 8
AScha.3
Chief II

...open cmos inputs...

try:

0693W00000bhkdhQAA_image.png

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

The circuit is a little bit strange:

  • GND of MK2 NRF24L01 is switched with NPN transistor and floating then (behavior unknown)
  • use CE for switch MK2 and add a pulldown resistor in this line from PB9 (for low level during startup)
  • R1 is very low and therefore current from PB0 very high -> use driver for higher currents or low current LED with hiher resistor (2mA)

Does not seem to make any difference unfortunately.

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. 😅

AScha.3
Chief II

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...

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

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...

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:


_legacyfs_online_stmicro_images_0693W00000bhlegQAA.pngI'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.

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:
_legacyfs_online_stmicro_images_0693W00000bhlevQAA.pngIt won't talk to me at all over SWD now.

Let me try with new components tomorrow and report back.