Page 1 of 1

‘MCU basic current’ increases after PWM operation. help me.

Posted: Wed Apr 24, 2024 2:47 am
by myksj1105
‘MCU basic current’ increases after PWM operation.


- core: https://github.com/rogerclarkmelbourne/Arduino_STM32


1. If there is no operation, the total current of 0.07A flows.

2. Turn on PWM
- (source code)pinMode(PA6, PWM); pwmWrite(PA6, 5000);

3. Turn off PWM
- (source code)pinMode(PA6, PWM); pwmWrite(PA6, 0);

4. The total current has increased.
- A total current of 0.22A flows.
- MCU power consumption has increased.

5. I wanted to restore it to its original state through soft reset, but the current remains the same.
- (source code) nvic_sys_reset();
- Total current 0.22A

6. If you turn off the entire power and turn it back on,
- Total current 0.07A

The conclusion is that after using 'pwmWrite', the power consumption of the MCU increases (increases).
Even if the pwm is turned off, the ‘MCU power consumption’ remains increased.
Moreover, even with ‘software power reset’, ‘MCU power consumption’ has increased.

Q1. I don't know why.
Q2. I want to solve it.
- I think it needs to be powered down and then turned on again. Is there a way?

video
https://drive.google.com/file/d/1O5L-9e ... sp=sharing



help me.

Re: ‘MCU basic current’ increases after PWM operation. help me.

Posted: Wed Apr 24, 2024 7:40 am
by fpiSTM

Re: ‘MCU basic current’ increases after PWM operation. help me.

Posted: Wed Apr 24, 2024 5:11 pm
by myksj1105
I found the cause. (Additional circuit diagram)
url: https://drive.google.com/file/d/1sUG4Nj ... sp=sharing

- MR1: Shunt resistance
- L4,L5: Bead resistance (0 ohm~1 ohm)
- Directly connected to ADC to measure current.

After removing L4 and L5, the problem disappeared. It seems that the leakage current between the MCU and ADC pin is the cause.

Anyway, I found the cause, and I sincerely thank you for your kind response.