andysworkshop / stm32plus

The C++ library for the STM32 F0, F100, F103, F107 and F4 microcontrollers

Home Page:http://www.andybrown.me.uk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting prescaler doesn't work on timers

mikepurvis opened this issue · comments

Seems to be this logic here, that doesn't use the value for anything, instead passing a hard-coded zero:

  template<class TTimer,PeripheralName TPeripheralName>
  inline void TimerPeripheral<TTimer,TPeripheralName>::setPrescalerImmediately(uint16_t value) {
    TIM_PrescalerConfig(*this,0,TIM_PSCReloadMode_Immediate);
  }

https://github.com/andysworkshop/stm32plus/blob/master/lib/include/timer/TimerPeripheral.h#L80-L95

FYI @mikeodr