2023-02-20 03:25 PM
2023-02-20 04:01 PM
Pretty sure you'll find all the STM32 have at least 2 16-bit TIM with 4 channels
2023-02-20 05:37 PM
Its all a question of understanding, sifting through the manuals has not been fun. So as I understand it, if a Timer, say Timer 1 has Ch1, Ch2, Ch3 and Ch4 outputs, then they are the Output Compare pins, if programmed for PWM mode.
2023-02-21 12:19 PM
Almost every STM32 will do (including the old good F103 on BluePill), maybe only the smallest STM32L0 models may not have enough channels. Another possibiblity is to use any F0/G0/L4/F7/H7/C0 single UART TX line to control two or more WS2812-alikes - only one pin is needed for a string of these LEDs.
2023-02-21 03:25 PM
Thanks for the rapid responses. Have an existing tightly packed four layer board layout, using an ATXMEGA(now not available until '24) so need to re-engineer it with an available processor. New part had to be close to 44 pins, cheapish, and QFP. After working my way through 20 or so first pages of data sheets, and cross checking against availability, found the L071. Nucleo board with the L073 is available, so I am on my way. All in all a days work to sort it out. Now the hard part starts, expect a few more queries, hard starting out on ARM at 74, my brain hurts.
2023-02-21 03:43 PM
Each TIM can have one frequency (single count element), unless you keep updating it.
The 4 channels can have there own duty cycles. ie four comparators / latches
So if I set it up for 50 Hz (20 ms), I could control 4 servo's independently.
PWM of different frequencies, might want a TIM each if you don't want to baby-sit them continuously.
2023-02-21 05:38 PM
On the ATXMEGA I ran the two timers at a fixed frequency, and set the terminal count according to which band an analogue signal was in. This PMW'd the RGB LEDs to give one of six colours. So needed two timers and 6 terminal count channels in all.
2023-02-22 04:12 AM
Consider G0 or C0 series - cheaper and more easily available than L0, also easier to route (less power pins).
2023-02-22 04:41 AM
i used for similar ... F030 , lqfp48 , 2 € , digkey has 27000 in stock.
Tim1 +Tim3 have x4 pwm outputs .
https://www.digikey.ch/de/products/detail/STM32F030C8T6/497-14043-ND/4357252
2023-02-22 03:08 PM
Thanks for the input, G0 and C0 don't meet some of my other requirements unfortunately, power not an issue, 4 layer board has a power plane.