Hi,
I am Davide Lusignani, from University of Parma (Italy).
I need to use NanoEdge function on KV4x device (MKV46F256VLL16) on all 12 PWM outputs.
The PWM period of PWMA and PWMB outputs changes when I modify FRACVAL1 register to control the duty-cycle of PWMX.
How can I disable this function and use FRACVAL1 without modifing the PWM frequency?
ps: the period of the PWM is set by EXT_SYNC from a timer.
Thanks in advance
update?
update?
Someone can help me?
Thanks in advance
Davide
Hi, Divide,
I am not very clear about your question.
Generally, the PWM cycle time of SM0/SM1/SM2/SM3 is controlled by the PWMA_SM0VAL1 - PWMA_SM0INIT if you use Master Sync of SM0 to synchronize all the SM1/SM2/SM3 modules. In the case, if you enable the Fractional Delay Logic function, obviously, setting the PWMA_SM0FRACVAL1 register to non-zero value is sure to take effect on the PWM cycle time. But if you use EXT_SYNC signal to synchronize the SM0/SM1/SM2/SM3, I think the external signal will control the PWMA cycle time.
I do not know why you use EXT_SYNC signal to synchronize all PWM sub-modules, if possible, I suggest you use Master Sync of SM0 to synchronize all the SM1/SM2/SM3 modules, and set the PWMA_SM0FRACVAL1 register to zero, in the scenario, the PWMA cycle time is only determined by PWMA_SM0VAL1 - PWMA_SM0INIT, the disadvantage is that the PWMA_X0 signal is restricted, because PWMA_SM0VAL1 is used to control both the PWMA cycle time and falling edge of PWMA_X0 signal.
Hope it can help you
BR
XiangJun Rong
Hi XiangJun Rong,
thanks for your answer.
I need to know if is possible to use NanoEdge function on the PWM_X without modify PWM_A and PWM_B characteristics (dutycycle, frequency, ecc).
I can use FRACVAL1 to have a fractional pwm on PWM_X, but when FRACVAL1 is a non-zero value the period of PWM_A and PWM_B changes.
I use the EXT_SYNC for set the pwm period because I do not want to use VAL0 and VAL1 registers to set it.
Davide
Hi, Davide,
I suggest you clear the FRAC1_EN in PWMx_SMnFRCTRL register and have a try, I think the PWM period will not change, but I do not know if it take effect on the duty cycle of PWM_X0.
BR
Xiangjun Rong
Hi Xiangjun Rong,
I tried to clear FRAC1_EN, but in this case the fractional edge of VAL1 is disabled, and Nanoedge function on PWM_X not work.
Davide.
Hi, Davide,
I am sorry, I have not good idea to enable nano-edge function on PWM_X0 without takeing effect on the PWM period.
BR
Xiangjun rong