2021-08-22 08:22 PM
I need to generate two signals as shown below.
I need to be able to adjust A and B independently. Is there some way to use TIMER1's OC1 and OC2? I can't figure out how to make an offset in the output compares - everything seems to start at the main counter expiring. I also looked into feeding TIMER2 into TIMER1 but I didn't see a solution there either.
Any nudge in the correct direction would help me, thanks!
Erik
2021-08-22 10:59 PM
Generally,you can use Asymmetric PWM mode of TIMER to generate this signal .
2021-08-23 07:50 AM
Thanks for the reply. I don't see an Asymmetric PWM mode in RM0016 manual, do you mean "center-aligned"? Center-aligned isn't quite what I want though.
2021-08-23 07:19 PM
Based on this MCU, I recommand to use TIM2 to trigger TIM1 to output. TIM2 output the signal you pictured above on TIM2 OC1. TIM2 OC1 is connected to TIM1 ETR to trigger TIM1 to output the signal you pictured below. And TIM1 worked on one-pulse mode and PWM mode 1. I'm not sure if you need to ouput these signal just on TIM1 OC1 and OC2.
2021-08-23 08:51 PM
Got it, I'll give it a shot and report back. thank you