I am quite excited when I see this support package for STM32F4Discovery Board. I want to try it on my board asap. However, I just want to share a couple of links here:
http://www.mathworks.co.uk/products/connections/product_detail/product_75144.html
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF258513
Have a look at this slide especially under Timer configuration -Structures page 34/35/36.
Key things to calculate the timer frequency are :
fpwm = TIM_counter_clk/(Period+1)
TIM_counter_clk=APB1_clk/(prescaler+1)
A number of students asked me how we really can configure our clock frequency based on our requirements. Therefore, I want to introduce you here STM32F4 Clock Config Wizard which is really helpful for you. This excel file contains macro can generate configuration file for you with user friendly interface. Also have a look at the AN3988 application note and the below video.
