Cortex M4 sinking a lot of current

In summary, when I increased the current limit from 30 mA to 75 mA the power supply output voltage changed 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.
  • #1
chingel
307
23
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.
 

Attachments

  • Schematic.PDF
    530.8 KB · Views: 432
Engineering news on Phys.org
  • #2
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?
 
  • #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.
 
  • #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.
 
  • Like
Likes berkeman

1. What is a Cortex M4?

The Cortex M4 is a type of microcontroller designed and manufactured by ARM Holdings. It is commonly used in embedded systems and has a 32-bit architecture.

2. How does a Cortex M4 sink current?

The Cortex M4 has several pins that can be configured as digital outputs. When these pins are set to a low state, they act as a sink for current, meaning they provide a path for current to flow to ground.

3. Why is my Cortex M4 sinking a lot of current?

There could be several reasons for this, such as having multiple pins configured as outputs and set to a low state, or having a high load on a pin that is set to sink current. It is important to carefully review the code and hardware configuration to identify the source of the high current sinking.

4. Can sinking too much current damage the Cortex M4?

Yes, excessive current sinking can cause damage to the microcontroller. This is because the pins are not designed to handle large amounts of current and can overheat, leading to permanent damage. It is important to properly calculate and limit the amount of current being sunk by the Cortex M4.

5. How can I reduce the current sinking of my Cortex M4?

There are several ways to reduce the current sinking of a Cortex M4, such as optimizing the code to use fewer pins as outputs, using external components to handle high loads, or using a higher voltage supply to reduce the current needed. It is also important to properly configure and test the hardware to ensure the current sinking is within the limits of the microcontroller.

Similar threads

  • Electrical Engineering
Replies
8
Views
1K
  • Electrical Engineering
Replies
8
Views
1K
  • Electrical Engineering
Replies
2
Views
1K
Replies
5
Views
789
  • Electrical Engineering
2
Replies
36
Views
2K
  • Computing and Technology
Replies
13
Views
349
Replies
10
Views
1K
  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
17
Views
2K
Replies
21
Views
5K
Back
Top