k20DX256 FTM ext trig

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

k20DX256 FTM ext trig

426 Views
richard_st-pier
Contributor I

Would like to externally trigger FTM1 (K20DX256) so that FTM1 CH0 is synchronized to an external rising edge.

How/can I?/ configure FTM1_CH1 as trigger input pin?  Read the datasheet, unclear how to assign external trigger pin, and configure the sync event. (PWM_SYNC 35.4.11, HW trig 35.4.11.1, FTM_ext trig 35.3.16) 

{ settings I am using are: MODE=0x01, SYNC=0x82, C0V=0, C1V=0, C0SC=0x28, C1SC=0x28, Combine=0x0033, SC=0x88, CNTIN=0, MOD=BFFF } which generates the desired pulse, but NOT synchronized to an external rising edge. 

FTM0 is currently used generating complementary signals with deadband, and modulated by FTM1_CH0.

Some guidance/example settings would help - Thanks

0 Kudos
1 Reply

364 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

The FTM Hardware Triggers can be found in Reference Manual.(The FTM1_CH1 can not act as trigger input pin.)

3.8.2.6 FTM Hardware Triggers.png

Not sure if you must use FTM1, due to FTM1_FLT0 share the same pin of XTAL0.(Maybe you can use other FTM module.)

FTM1_FLT0 PTA19.png

Please check if you want to achieve the FTM counter synchronization shown below:

37.4.11.10 FTM counter synchronization.png

Then you may follow the FTM counter synchronization flowchart, and configure the corresponding register.

Figure 37-221. FTM counter synchronization flowchart.png

FTMx_SYNCONF[HWRSTCNT][SYNCMODE][HWTRIGMODE].pngFTMx_SYNC[TRIG2].png

There are two Application Note for you refer:

AN4560 PWM Synchronization Using Kinetis Flextimers

AN5261 Kinetis Flextimer Buffered Registers Update

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos