A little mistake in file stm32duino/hardware/Arduino_STM32/STM32F4/cores/maple/libmaple/timer.h LINE 271 #define TIMER_SMCR_ETF (0xF << 12) Change (0xF << 12) to (0xF << 8) 