I wrote a custom STM32 timer driver in Input Capture mode so that I could sync a Ticker
object interrupt to an external signal.
I assumed that I could take the input capture value and use it to set the interrupt like so:
ticker.attach_us(myFunc, inputCapture);
However, I quickly found out that in order for the Ticker
class to be in sync with my custom timer used for input capture, they would both need to be clocked from the same clock source.
To my understanding, the STM32F446RE system clock configuration is set to at 180MHz, but how can I find out the clock rate for MBEDs timers / ticker class? I imagine they have their own prescalers values.
I think if I match the same prescaler values of MBEDs timers with my custom timer, I should be ok - anyone know where I can find this information?