Stm32F4xx set timers to max clock

I use a stm32f407 (black_f407vg) with the arduino framework. I tested some ideas with the timers. As i can see that the timer2 is running on 84MHz, but the maximum is 168MHz. As i know there are two clock sources for the timers, APB1 and APB2. ABP1 is max 84 MHz and APB2 168MHz with a prescaler.

My question: how can i set the clock to max. for the timers and how can i read back the configuration to see which clock source and prescaler is used.
Thanks in advance.

I found a solution for myself.

  1. Timer2 cannot be set to APB2.
  2. All this settings can be found in the Variants startup cpp files. That leads me to a new question.

Thank you