Skip to main content
Chris Lynch
Associate II
February 16, 2023
Solved

How can I find STM32 devices with the most PWM input channels?

  • February 16, 2023
  • 10 replies
  • 5238 views

Hi,

I have a project where I need at least 8 PWM input channels, 10 would be great.

I can't see a method to filter by PWM input on the website or in STM32CubeMX. I would like to round it down to a few devices and compare them on cost, package, etc.

Is there a method to do this that I'm missing?

At the moment I'm simply choosing the devices with the most timers and working through the list 1 by 1 using STM32CubeMX, this is quite a slow approach.

Any advice is welcome.

Thanks

This topic has been closed for replies.
Best answer by Javier1

Search fot number of TIMers,

0693W00000YAsqqQAD.pngSo it would boil down to series F1 F4 and F7

I guess youre using Input capture, did you tried bursting ADC's?

10 replies

Javier1
Javier1Best answer
Principal
February 16, 2023

Search fot number of TIMers,

0693W00000YAsqqQAD.pngSo it would boil down to series F1 F4 and F7

I guess youre using Input capture, did you tried bursting ADC's?

hit me up in https://www.linkedin.com/in/javiermuñoz/
Chris Lynch
Associate II
February 16, 2023

.

Chris Lynch
Associate II
February 16, 2023

Javier,

Yes, I'm using the "Combined Channels" feature which allows the channel 1 input capture to measure the signal period and channel 2 to measure the pulse width (on time). This has worked well in combination with DMA.

0693W00000YAsmMQAT.pngI will look into the ADC suggestion :)

STM32F7 value line is the best match so far, but it would be useful if the search function in STM32CubeMX or the ST website allowed filtering by which timers support PWM input capture

KnarfB
Super User
February 16, 2023

9 PWM input timers on STM32H723ZGTx, who finds more?

hth

KnarfB

Chris Lynch
Associate II
February 16, 2023

KnarfB,

Nice find, I just checked the STM32H723 device and it has 10 PWM inputs, 9 of which have DMA.

Ill keep looking just in case I come across a cheaper part.

Thanks for the help

Chris

KnarfB
Super User
February 16, 2023

and there is a Nucleo board for it which might be interesting for quick prototyping/availability. knarfb

S.Ma
Principal
February 16, 2023

You can have a look also at STM32G4 series, motor control apps usually need lots of PWM inputs.

There are sometime high resolution timers with increased functionality (and complexity).

Usually TIM1 and TIM8 are "advanced timers" with at least 4 input channels each.

Sometime, you can hookup a DMA to one channel feeding a RAM array.

Chris Lynch
Associate II
February 16, 2023

Thanks, ill take a look.

waclawek.jan
Super User
February 16, 2023

> I'm using the "Combined Channels" feature which allows the channel 1 input capture to measure the signal period and channel 2 to measure the pulse width (on time)

Depending on particularities of input signal, you should be able to get away without the timer reset, purely from input capture on the CH1/CH2 and CH3/CH4 pairs, doubling the capability of the "usual" 4-channel timers. If edges are sufficiently far apart, a single channel should suffice per signal, allowing you to use almost any STM32 with enough pins.

JW

Chris Lynch
Associate II
February 16, 2023

You are correct and this is how we have previously captured low frequency PWM inputs.

On this particular design the PWM frequency is 20kHz which has led me to the PWM input + DMA + reset approach.

waclawek.jan
Super User
February 16, 2023

The question also is, do you need to process each and every period of every input? If yes, it's quite a bit of data even in case of hardware processing. If not, one trick off the sleeve is to switch different pins of the same timer in GPIO.

You might want to experiment (with a limited number of signals and with whatever STM32 you have at hand) to get feeling of where are the limits of indvidual methods.

An option to contemplate might be also to use a larger number of interconnected cheap STM32.

In some cases, integrating the PWM and reading out the result using ADC is also an option.

JW

Visitor II
October 22, 2023

I can see that you have already found your answer. Btw, if you need further clear info about PWM with STM32, you can see this article. https://www.theengineeringprojects.com/2021/12/pwm-with-stm32.html

It shows how to configure and write an application to dim an LED connected to an output pin (GPIO) of the STM32F446RE Nucleo board.