
Search found 4 matches
- Mon Mar 14, 2022 1:32 pm
- Forum: General discussion
- Topic: How to dynamically change duty cycle with HardwareTimer library?
- Replies: 24
- Views: 14747
Re: How to dynamically change duty cycle with HardwareTimer library?
Thanks, ABOSTM. It all makes sense now. 

- Sun Mar 13, 2022 12:26 pm
- Forum: General discussion
- Topic: How to dynamically change duty cycle with HardwareTimer library?
- Replies: 24
- Views: 14747
Re: How to dynamically change duty cycle with HardwareTimer library?
To me, both the documentation at https://github.com/stm32duino/wiki/wiki/HardwareTimer-library and the discussion you referred to at https://github.com/stm32duino/Arduino_Core_STM32/issues/897 sound like setCaptureCompare is indeed 1-indexed, same as setOverflow . But since I don't fully understand ...
- Sat Mar 12, 2022 2:51 pm
- Forum: General discussion
- Topic: How to dynamically change duty cycle with HardwareTimer library?
- Replies: 24
- Views: 14747
Re: How to dynamically change duty cycle with HardwareTimer library?
The example in the documentation Wiki says this (in slightly broken English):
MyTim->setOverflow(10000); // Default format is TICK_FORMAT. Rollover will occurs when timer counter counts 10000 ticks (it reach it count from 0 to 9999)
The documentation also says that both the Overflow and the ...
MyTim->setOverflow(10000); // Default format is TICK_FORMAT. Rollover will occurs when timer counter counts 10000 ticks (it reach it count from 0 to 9999)
The documentation also says that both the Overflow and the ...
- Sat Mar 12, 2022 12:11 am
- Forum: General discussion
- Topic: How to dynamically change duty cycle with HardwareTimer library?
- Replies: 24
- Views: 14747
Re: How to dynamically change duty cycle with HardwareTimer library?
Thanks, Bakisha, for the helpful explanations! :) Regarding your example code:
PWMtimer ->setOverflow( 255 , TICK_FORMAT); // Overflow in 256 ticks
If I understand the documentation (https://github.com/stm32duino/wiki/wiki/HardwareTimer-library) correctly, you would have to set this to 256 ...
PWMtimer ->setOverflow( 255 , TICK_FORMAT); // Overflow in 256 ticks
If I understand the documentation (https://github.com/stm32duino/wiki/wiki/HardwareTimer-library) correctly, you would have to set this to 256 ...