Hi Michael Liebert
Sorry for the late reply;
Glad to heard that the update of your FTM1_CNT is gone; updating CnV is a little more complicated, you need to enable the PWM synchronization, This feature provide a method to update the MOD, CNTIN,CnV, SWOCTRL, etc. You can read the section 35.4.10 Registers updated from write buffers of reference manual (Sorry I didn't know what MCU you were using, that's why I mentioned a wrong chapter in the previous mail).
I post here a code that setup the PWM synchronization triggered by software, (using FTM0 and channel 0 or 1)
FTM0->COMBINE |= FTM_COMBINE_SYNCEN0_MASK;
FTM0->SYNCONF |= (FTM_SYNCONF_SYNCMODE_MASK | FTM_SYNCONF_CNTINC_MASK | FTM_SYNCONF_INVC_MASK | FTM_SYNCONF_SWOC_MASK);
FTM0->SYNC |= FTM_SYNC_SYNCHOM_MASK;
FTM0->SYNCONF |= (FTM_SYNCONF_SWRSTCNT_MASK | FTM_SYNCONF_SWWRBUF_MASK | FTM_SYNCONF_SWINVC_MASK | FTM_SYNCONF_SWSOC_MASK | FTM_SYNCONF_SWOM_MASK);
So after you update C0V or C1V you trigger the sync with
FTM0->SYNC |= FTM_SYNC_SWSYNC_MASK;
Hope this information helps you, please let me know if this could resolve your problem
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------