[MCPWM] how to reset timer

michprev
Posts: 92
Joined: Fri Aug 04, 2017 8:57 pm

[MCPWM] how to reset timer

Postby michprev » Fri Mar 09, 2018 12:01 am

Hello,
I would like to use MCPWM peripheral in different start - stop modes (please see PWM_TIMER0_CFG1_REG register PWM_TIMER0_START value in https://www.espressif.com/sites/default ... ual_en.pdf).
  • What is the way to start PWM timer with PWM_TIMER0_START set to 0 (if PWM timer0 starts, then stops at
    TEZ) or 1 (if timer0 starts, then stops at TEP)?
  • Let's say I am setting PWM line high on TEZ and low on TEP. What is the difference between modes 3 (timer0 starts and
    stops at the next TEZ) and 4 (timer0 starts and stops at the next TEP)?
  • And finally when the timer stops at TEZ or TEP in mode 3 or 4 what is the way to start the timer again (reset it) in the same mode? I figgured out that it is possible to toggle PWM_TIMER0_SYNC_SW register (there is a typo in V2.8 docs, there is PWM_TIMER1_SYNC_SW twice) and then set PWM_TIMER0_START again. Is this the correct approach or is there any other option?
Thank you!

hamaoui
Posts: 2
Joined: Tue Mar 28, 2023 1:20 am

Re: [MCPWM] how to reset timer

Postby hamaoui » Sun Aug 04, 2024 6:14 pm

Hi,
Did you find a solution for your problem?
I have the same issue and I am looking for a solution.
My project is a 3 phase motor.
If you can share you code :roll:
Thanks

Who is online

Users browsing this forum: No registered users and 71 guests