HI.
Thank you for your kindness.
I ask a question about the title. A sample source and Waveform screenshot attached.
(This is a modified version of SDK_2.6.0_MKE04Z128xxx4 \ boards \ frdmke06z \ driver_examples \ ftm \ output_compare)
・ Question
Modified to not output from the port. I set the FTM output port (PTC0 in this example) to GPIO output and toggle it with an FTM interrupt, but I can't. The neighboring PTC1 toggles, so I think the GPIO settings are correct.
What is missing?
According to the manual, if ELSnB: ELSnA = 00, the pin-channel pins not used for FTM are returned to general-purpose I / O or other peripheral device control.
Thank you.
jun.
解決済! 解決策の投稿を見る。
Hi,
The second parameter is the pin number. PTC0 should set 0 , not 1u<<1. "1<<1" is PTC2
Hi.
Thank you for pointing out the mistake.
it is complete.
best regard.
jun.
Hi,
Maybe the parameter is "kFTM_ToggleOnMatch"
Hi.
Thank you for your answer.
There was not enough explanation. I don't need output port access and just want to use FTM as a timer interrupt. I want to use FTM1 channels 0 and 1 for MODBUS T1.5 and T3.5 timers. Can the output compare mode be used for these two timers?
Jun
**********************************************
(株)中央製作所
技術部 開発設計課 山田 淳
E-Mail jun@cew.co.jp
TEL 022-382-8123
FAX 022-382-8136
〒981-1251
宮城県名取市愛島台7丁目101番地51
Hi,
In function "BOARD_InitPins" , did you set the PTC0 as a FTM channel? If so, please comment it.
Hi.
Sorry for lack of explanation. If it is that parameter, it will toggle output, but all I want is timer interrupt and I don't want FTM port output. I want to do port output at another timing in another task. What should I do in this case? Is it possible to access GPIO corresponding to FTM with software?
jun