Hi
I would like to know when MCPWM_TIMERx_PRESCALE is updated
The documentation describe how I can control the update of MCPWM_TIMERx_PERIOD configuring register MCPWM_TIMERx_PERIOD_UPMETHOD (I'm using TEZ rn) but not what happen to MCPWM_TIMERx_PRESCALE
I would like to know when a write to MCPWM_TIMERx_PRESCALE get applied to the actual scaler
(Immediately? TEZ? TEP? only on manual sync?)
ALSO what happen if I set MCPWM_TIMERx_PERIOD_UPMETHOD=0 (immediate) and set MCPWM_TIMERx_PERIOD to a value that is LOWER than the current MCPWM_TIMERx_VALUE?
( new MCPWM_TIMER0_PERIOD < MCPWM_TIMER0_VALUE < current MCPWM_TIMER0_PERIOD Does it immediately jump to TEZ? or having already passed the value of period it keep running until it overflow?)
Unfortunately I'm not using IDF and writing directly to registers (IDF do not enable me to do what I want)
I'm working with both ESP32 and ESP32-S3
Thanks,
Luca
MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
-
- Posts: 8
- Joined: Mon Nov 28, 2022 11:29 am
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
New timer pre-scale value will take effect when the timer goes from STOP to START.I would like to know when a write to MCPWM_TIMERx_PRESCALE get applied to the actual scaler
it keep running until it overflow. No TEP event would be generated.new MCPWM_TIMER0_PERIOD < MCPWM_TIMER0_VALUE < current MCPWM_TIMER0_PERIOD Does it immediately jump to TEZ? or having already passed the value of period it keep running until it overflow?
-
- Posts: 8
- Joined: Mon Nov 28, 2022 11:29 am
Re: MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
So there is no way to have it updated on TEZ?New timer pre-scale value will take effect when the timer goes from STOP to START.
So in this case it get updated:
- PWM_TIMERx_CFG1_REG.PWM_TIMERx_START = [0, 1, 3, 4]
- Timer stop at Zero or Period (or was already stopped)
- PWM_TIMERx_CFG1_REG.PWM_TIMERx_START = [2, 3, 4]
Thanks,
Luca
Who is online
Users browsing this forum: No registered users and 25 guests