If you have used imp.setpowersave(true) in your code, and then remove this statement and run (download) the new code, the powersave mode does not return to the default value of ‘false’.
You have to explicitly call imp.setpowersave(false), or reboot the imp to revert to the default state.
I think this should be mentioned in the documentation wiki. There might be other default states that behave similarly.
That’s a good point. And you’re right that there are others: imp.enableblinkup(), for instance. And in fact most of the hardware.* API has long-lasting effects, too: if you set a pin as a driven, push-pull output, and then download new code that doesn’t touch that pin at all, then it keeps its old configuration.
A power-cycle resets all settings, as indeed does a deep-sleep or (on imp003) the RESET_L pin. This is a thread from quite a while ago (in imp terms!) and in fact nowadays almost all of the hardware.* APIs are reset when new Squirrel is loaded.