The "timer" example is actually "the same" for both f1 and f4. Do a sanity sweep over the commentary, remove all vestiges that this was cloned from a motor control example, and synchronize both examples. Future work should extract the common portions "somewhere" but at least make them consistent for now.
README
This directory contains examples for the original stm32f4 discovery. The PCB should be labelled either MB997A or MB997B, and contains a user USB port, and an audio dac on board, along with a MEMs microphone and an accelerometer.
http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419
The later stm32f4 discovery boards, for the f401, MB1115B and for the f429i, MB1075B will not work as is with these demos, but they should only need minor tweaking for pin configurations.