MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
Posted: Sat Feb 10, 2024 9:04 pm
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
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