Output compare mode setup using Flex timer module in KDS 1.2.0 ok to use?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Output compare mode setup using Flex timer module in KDS 1.2.0 ok to use?

ソリューションへジャンプ
911件の閲覧回数
chadwilliams
Contributor III

I have noticed in the reference manual for KDS1.2.0 page 559 it says:

The current Kinetis SDK driver only supports the generation of PWM signals. The input capture

and output compare will be supported in upcoming Kinetis SDK releases.

 

But in fsl_ftm_driver.c theres a function: FTM_DRV_SetupChnOutputCompare()

so that would indicate the functionality exists already. But there is no example code

to demonstrate output compare mode and Processor Expert doesn't allow me to

select Output Compare mode in the ftm driver component.

 

Output compare mode is necessary for driving motors etc so its an important feature

of many embedded microcontrollers.

 

Can anyone confirm FTM_DRV_SetupChnOutputCompare() does work ?

ラベル(1)
0 件の賞賛
返信
1 解決策
507件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Chad:

It seems the output compare mode is not yet fully implemented, only the PWM modes (Edge Aligned / Center Aligned / Combined).

However you can use that API you mention in the meantime. It lets you set a channel in output compare mode with a determined compare value and channel output mode (set on match, clear on match, toggle on match). Use the API FTM_DRV_Set_Clock() to change the counting frequency.

You still need to call the function FTM_DRV_Init() and FTM_DRV_Set_Clock() before calling the OutputCompare API, processor expert does it for you if you select "Auto initialization".

Regards!

Jorge Gonzalez

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
508件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Chad:

It seems the output compare mode is not yet fully implemented, only the PWM modes (Edge Aligned / Center Aligned / Combined).

However you can use that API you mention in the meantime. It lets you set a channel in output compare mode with a determined compare value and channel output mode (set on match, clear on match, toggle on match). Use the API FTM_DRV_Set_Clock() to change the counting frequency.

You still need to call the function FTM_DRV_Init() and FTM_DRV_Set_Clock() before calling the OutputCompare API, processor expert does it for you if you select "Auto initialization".

Regards!

Jorge Gonzalez

0 件の賞賛
返信