2021-06-22 05:26 AM
It finally happened, i need two pins without pwm functionality to output pwm signals (minimum 1kHz)
Im using an STM32f072R8Tx clocked with HSI48Mhz, my TIM1 is available.
My idea is:
TIM1 channels 1 and 2 set up as PWM NO OUTPUT with interruption enabled, discriminate the source of the interruption (channel).
Toggle the corresponding GPIOs inside the IRQ function.
Is there another magical way that doesnt interrupt my programm every milisecond?
Solved! Go to Solution.
2022-04-18 07:57 PM
<<Disregard>>
2022-04-19 07:21 AM
@AFran.7 You had an interesting point, why did you redacted your own comment?
Im still learning the ways in which gcc chews my code
2022-04-19 01:00 PM
I've been struggling to get this working. Whenever I increase the pwm buffer size > 4, my I2C DMA process stops working correctly and no longer produces an interrupt on completion.
I had originally thought that I had fixed the problem as above, but turns out my hypothesis was incorrect.
As of yet I cannot get the different DMA channels to play nice with each other.
Edit:
I think I figured it out, I had the DMA going in the wrong direction