Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Cortex M4 sinking a lot of current

  1. Dec 22, 2016 #1
    I'm trying to get the STM32F446 Cortex M4 microcontroller working on a board which I designed myself (I'm not an expert in this, but I'm learning).

    When I apply 5V through a current limiting power supply to the 3.3V LDO, the microcontroller uses all the current (max I used was 150 mA as the power supply current limit) and the power supply voltage drops to 3.1V (which means about 2.9 after the LDO), because I have the current limiter on. The power led is still burning nicely because it has 2.9V on it. So something is using up the current.

    When I change the current limit from 30 mA to 75 mA the power supply output voltage changes from 2.8 V to 3.1 V.

    When the microcontroller was unsoldered, the voltage after the LDO was nicely 3.3V and the current consumption was < 10 mA. When I added the microntroller, the capacitors and the oscillator, the current consumption goes to the limit I set on the power supply. Using an oscilloscope I measured that the input voltage isn't oscillating, also on the oscillator I don't get anything significant, there seems to be an around 10 mV random noise.

    The outputs of most of the pins are at 0.4V. For some reason pin 50 (JTAG JTDI) and 56 (JTAG NJTRST) are at the VCC level (2.9 V).

    The NRST pin was high and the BOOT0 and BOOT1 pins were low (they have a pulldown resistor). When I measure the resistance between 3.3V LDO output and GND it gives me a varying resistance (due to the capacitors) in kiloohms, if there was a short it should show a small resistance. I measured the resistance between all pins and ground and there didn't seem to be an anomaly.

    I was wondering if someone has experience with these microcontrollers and maybe knows that something is missing in the schematic which causes these problems? There doesn't seem to be a short and for some reason the microcontroller is sinking a lot of current. According to the datasheet (here page 83), it doesn't use more than 100 mA even when all peripherals are enabled. You can find the relevant schematic of my board in the attached pdf on the first page (ignore the motor driver and the UART to USB chip on the second page, those haven't been soldered yet). I also haven't soldered the JTAG connector or the 4 debug leds. Only the oscillator, microcontroller, LDO, PWR led, usb socket with its ESD protection, 3 buttons and the relevant capacitors/resistors.

    Attached Files:

  2. jcsd
  3. Dec 23, 2016 #2


    User Avatar

    Staff: Mentor

    Sorry if I missed it, but what is the current consumption listed in the datasheet? 150mA for a 25MHz uC doesn't seem unreasonable to me. When the uC is blank/ what is the clock configuration? Like does it default to x1 of the outside 25MHz crystal? Or does it default to a lower-power internal RC oscillator?

    Can you talk to it via JTAG when it's powered up? Can you read its JTAG ID out?
  4. Dec 23, 2016 #3
    On page 84 it says that at 180 MHz the typical current is (depending on the peripherals) 86 mA and the max at 25 Celsius is 93 mA. Even at 105 degrees Celsius the maximum number in the table is 125 mA (that's the largest number I can find in the table).

    It also says on page 75 that IO pins can sink or source 25 mA for each pin, but not more than 120 mA all together. This adds to the previous numbers, which only meant the current used by the processor itself, AFAIK. So if there is some problem on the pins and they have significant current going through them I guess the total current can go over 150 mA. But there shouldn't be anything there ... and I was more worried that there is some problem and I missed something (as this is my first time making an ARM board) and I can fry my microcontroller if I increase the limit.

    In section 3.13 in the datasheet it says that at reset the 16 MHz internal RC oscillator is chosen as the default CPU clock (the running application can then change the source to the external clock source and change the clock frequency).

    I haven't soldered the JTAG connector and I don't have a JTAG debugger, but I can probably borrow one if it might be a good idea to test the connection there.
  5. Dec 24, 2016 #4
    It turns out that VCAP is the 1.2V output of the internal regulator and I had connected it to VCC. I'm currently away from the PCB, but in a few days I'll try it out and cutting the trace at VCAP to VCC should fix it.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted