2018-08-06 02:31 AM
Hi,
I am working on STM32H743. Our application needs the following
1. At least 10 PWM outputs with independant frequencies
2. At least 10 PWM inputs with independant frequencies
The frequencies can go upto 100s of kHz
Looking at STM32H743 spec, it provides the following peripherals for dealing with this need.
1. TIM1, TIM2, TIM3, TIM4, TIM5, TIM8, TIM12, TIM13, TIM14, TIM15, TIM16
=> 11 independant frequencies possible with these channels
2. LPTIM1...5
=> 5 independant frequencies(only PWM outs) possible with LPTIMs
3. HRTIM
=> 5 or 6 independant frequencies possible with HRTIM
However, a lot or these pins are not available due to pin conflicts (primarily due to USB and ethernet). So I am still short of about 3 or 4 PWMs (in or out). Is there any other way to generate or measure PWMs in STM32H7?. Appreciate any support or guidance on this topic.
Note: I may be able to spare 2 or 3 DMAs(from DMA1 & DMA2), but the rest are used up. Also don't want to flood the system with interrupts.
2018-08-06 04:10 AM
It is odd to need independent frequencies for pwm.
Unused output compares can be made as timers for pwm generation.
For systick for that matter.
Pwm measurement can be done with external interrupt plus a time base.
2018-08-06 09:24 PM
Well, the frequency is too high for using interrupts. Say @200 kHz, we will be interrupting the CPU every 5 microseconds taking away most of the CPU power.
I was hoping for some other design solution (other than what I already mentioned in the original question)
2018-08-07 03:22 AM
if you cannot have a hardware solution and you don't want a software solution, then you don't have a solution (with MCUs). it is that simple.
maybe you can think of a hardwired logic solution, or FPGA.
2018-08-07 05:54 AM
Would agree that CPLD/FPGA approach to do measurement, generation and decimation, seems to be the most effective/scalable solution.
What's the driver to use the H7 over some of other F7 parts? If you can off-load busy work to a hardware/logic unit can you use something running at 200 MHz rather than 400 MHz?
2018-08-07 10:15 PM
Thank you for the responses. Shall look into the other possibilities as you mentioned.