2026-01-28 7:58 PM
When I write code, should I keep the microcontroller on, or turn it off and only turn it on when I want to test the code?
Solved! Go to Solution.
2026-01-28 8:06 PM
This will make no big difference.
If you run it from battery you can save its capacity (especially if you have a LCD connected).
Besides of that there is a really small impact on your personal CO2 footprint, depending on how long you code.
Regarding the MCU's expected life time it will exceed my remaining lifetime by far.
So who cares?
2026-01-28 8:06 PM
This will make no big difference.
If you run it from battery you can save its capacity (especially if you have a LCD connected).
Besides of that there is a really small impact on your personal CO2 footprint, depending on how long you code.
Regarding the MCU's expected life time it will exceed my remaining lifetime by far.
So who cares?
2026-01-29 1:24 AM - edited 2026-01-30 2:48 AM
Hello,
Not sure to understand what do you mean by "turning off the microcontroller when I write a code"!
Do you mean powering-off the MCU after flashing the application to your MCU or during the flash operation? "when" is confusing here.. Please provide more details of the application scenario and why.
Please review How to write your question to maximize your chances to find a solution
2026-01-29 1:30 AM
I often make small code changes while debugging. Of course breakpoints etc. won't align if you insert lines, but for small changes that's not a problem. Of course the changes are not applied until you build and flash.
2026-01-29 1:31 AM - edited 2026-01-29 1:32 AM
As the others have said, it's not at all clear what you mean here!
By "writing code", do you mean typing stuff into your editor/IDE ?
Typing into the editor and building ("compiling") have no interaction with the target (your microcontroller) at all - so it is entirely immaterial whether the target is on or off.
2026-02-04 2:56 AM
Could you please state on this thread please?
2026-02-11 1:51 AM
@cockatoo you never did explain what you actually meant by the question - several contributors pointed out that it is ambiguous, and asked you to clarify this.
The answer would make more sense if we knew for sure what the question really meant!