My forked repository. DISCO_F407VG, DISCO_F303VC, DISCO_F051R8 and DISCO_F100RB maybe added.
Dependents: FastPWM-DISCO-test
Fork of FastPWM by
Diff: Device/FastPWM_KLXX.cpp
- Revision:
- 9:c50f688cad07
- Parent:
- 8:a7745c791b0c
diff -r a7745c791b0c -r c50f688cad07 Device/FastPWM_KLXX.cpp --- a/Device/FastPWM_KLXX.cpp Fri Jun 27 05:48:25 2014 +0000 +++ b/Device/FastPWM_KLXX.cpp Fri Jun 27 06:02:37 2014 +0000 @@ -11,11 +11,11 @@ } void FastPWM::period_ticks( uint32_t ticks ) { - *(_pwm.MOD) = ticks; + *(_pwm.MOD) = ticks - 1; } uint32_t FastPWM::getPeriod( void ) { - return *(_pwm.MOD); + return *(_pwm.MOD) + 1; } uint32_t FastPWM::setPrescaler(uint32_t reqScale) {