See STM32duino+emonlib - strange behavior - #4 by Robert.Wall