Hi, Ari,
Sorry for the delay. I developed an example for the nano-edge placement feature of eFlexPWM based on TWR-KV58F220M and KDS ver3.0 tools. I attach the code and screenshot of the scope.
Regarding the code, you have to pay attention to the following items:
1)Only eFlexPWMA supports nano-edge placement feature, the eFlexPWMB module does not support the nano-edge placement feature, but the FlexPWMB module supports dithering mode.
2)The PLL part of MCG in the RM of KV5x has error, there is a divider2 after VCO, but the RM does not mention the divider2, which will leads wrong clock frequency.
/In the code, the MCG5=0x03, MCG_C6=0x50, VCO output will be [50MHz/(3+1)]*32=400MHz, after divider2, the MCGOUTCLK will be 200MHz, core/system clock is 200MHz
//Explanation:The eFlexPWM0 is driven by fast peripheral clock because the SIM_CLKDIV1 is 0x01370000. The fast peripheral clock frequency is 100MHz, the PWM signal frequency is 100MHz/16=6.25mhz.
//The fractional clock frequency is 32*100MHz=3.2G, the PWM0_SM0FRACVAL5=15<<11; the delay=15*(1/3.2G)=5nS
//The analysis match with the waveform on the scope:
//The yellow waveform is the PWMA_A0(A40 on primary elevator), the red waveform is the PWMA_B0(A39 on primary elevator)
Hope it can help you.
BR
XiangJun Rong
