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

Post here all questions related to LibMaple core if you can't find a relevant section!
Post Reply
myksj1105
Posts: 56
Joined: Sun Jun 18, 2023 11:35 am
Answers: 1

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

Post 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.
by myksj1105 » Wed Apr 24, 2024 5:11 pm
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.
Go to full post
User avatar
fpiSTM
Posts: 1757
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

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

Post by fpiSTM »

myksj1105
Posts: 56
Joined: Sun Jun 18, 2023 11:35 am
Answers: 1

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

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

Return to “General discussion”