2024-12-28 05:19 AM
I've been struggling to demonstrate timer capabilities, with some success but a lot of unexpected failures. I don't see any "application notes" (ANxxx) in the documentation and very little howtos in the reference manual. Is there a list of recipes for code setup for common timer usages (countup/down, repeating, using capture/compare for countup, etc)?
2024-12-30 06:45 PM
There are a whole bunch of example projects out there for various timer setups. If you are looking for existing code, I'd recommend using the Example Selector in STM32CubeMX/IDE and loading those, or examining the code online.
2024-12-31 10:28 AM
> STM32CubeMX/IDE
...for 8-bit STM8?
2024-12-31 12:52 PM
First mention of 8 bit. But as a rule there is always lots of code on github for anything you can think of.
2025-01-02 01:28 PM
> First mention of 8 bit.
Asked in 8-bit specific forum (look at url, and at top where it says "STMicroelectronics Community > Product forums > STM8 MCUs".
> always lots of code on github
If I want, for instance, to see if UIE in TIMx_IER (in RM0016) is necessary if I'm not using interrupts (manually checking status codes in software loop), or if I can get by with just just CEN in TIMx_CR1, there is precious little in the way of examples. This is just an example. My point is that even the best places (this is one of the best, as are all other articles in his "The Way of the Register" series) explain what to do, but not specifically why one register is used over another, or in what combination to achieve what is desired.