You can get the apb clock frequency at run time by using the function RCC_GetClocksFreq
which is provided in the STM32 peripheral library. For this function to return correct values, if you are using an external crystal which has a frequency other than the default value (8 MHz or 25 MHz for the STM32F1xx, check for your microcontroller) you need to define the macro HSE_VALUE
and set it to the crystal frequency used in your project.
You didn't say which microcontroller you are using (there are a lot of different stm32 micros), but the different parameters are documented in the reference manual corresponding to your microcontroller family, for example for the STM32F1XX this would be section 15.3 of the reference manual, this document:
http://www.st.com/web/en/resource/technical/document/reference_manual/CD00171190.pdf