cancel
Showing results for 
Search instead for 
Did you mean: 

Should I turn off the microcontroller when I write code?

cockatoo
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
mfgkw
Senior III

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?

View solution in original post

6 REPLIES 6
mfgkw
Senior III

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?

mƎALLEm
ST Employee

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

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
Andrew Neil
Super User

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.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Employee

@cockatoo 

Could you please state on this thread please?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@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!

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.