Cortex M4 sinking a lot of current

Click For Summary

Discussion Overview

The discussion revolves around troubleshooting high current consumption issues with the STM32F446 Cortex M4 microcontroller on a custom-designed board. Participants explore potential causes related to the microcontroller's power supply, configuration, and connections, focusing on both theoretical and practical aspects of the design.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant notes that the microcontroller draws excessive current (up to 150 mA) when powered, which is inconsistent with the datasheet specifications that indicate a maximum of 100 mA under normal conditions.
  • Another participant questions the clock configuration of the microcontroller, suggesting that the default settings may affect power consumption.
  • Discussion includes the possibility that IO pins could be sourcing or sinking significant current, potentially exceeding the expected limits if there are issues with the connections.
  • A participant mentions the internal RC oscillator as the default clock source upon reset, which could influence power usage if not switched to the external crystal.
  • One participant identifies a potential wiring error where the VCAP pin was incorrectly connected to VCC, which they believe may be the source of the high current draw.

Areas of Agreement / Disagreement

Participants express varying levels of concern regarding the current consumption, with some suggesting that the observed values could be reasonable under certain conditions, while others emphasize the need for further investigation into the circuit design and connections. No consensus is reached on the exact cause of the issue.

Contextual Notes

The discussion highlights potential limitations in the schematic design and the importance of verifying connections and configurations, particularly regarding the power supply and clock settings. There are unresolved questions about the impact of the incorrect VCAP connection on the microcontroller's performance.

chingel
Messages
307
Reaction score
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

Engineering news on Phys.org
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?
 
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.
 
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   Reactions: berkeman

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 38 ·
2
Replies
38
Views
5K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
12
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K