fixes incorporated from Keith's STM32L151 pin by pin review