fsl_ftm KSDK v1.3 setup

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

fsl_ftm KSDK v1.3 setup

跳至解决方案
3,726 次查看
shauldorf
Contributor V

Does anyone know how to setup "fsl_ftm" component to measure Pulse Width using KSDK1.3 + Processor Expert.

Using TU_LDD (without KSDK) component my application it is working perfectly (My input pin is PTC4 / J2_4).

I'm using KDS 3.2 and KSDK 1.3

标签 (1)
0 项奖励
回复
1 解答
3,439 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shaul,

If you use Init_FTM, the interrupt function need write by yourself .

Under this component , there only generate one init function refer to your configuration .

So in  KSDK . you can use the function FTM_SetupDualEdgeCapture() , it can be used to measure the pulse width of a
signal.

Hope it helps
Have a great day,
Alice

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

在原帖中查看解决方案

7 回复数
3,439 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shaul,

You can use the two method "FTM_DRV_SetupChnDualEdgeCapture()" and

"FTM_DRV_SetupChnInputCapture" to test .

If have  any question ,you can contact us .

Hope it helps


Have a great day,
Alice

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

0 项奖励
回复
3,439 次查看
shauldorf
Contributor V

Alice Thanks;

I forgot to mention that I’m using FRDM-K64 and I want to read output from Infrared controller.

Using “TU_LDD” (Kinetis component without KSDK) was straight forward.

But using “KSDK “ I’m confused with Component Inspector window Configuration options

how to configure the component to measure input durations.

I guess that it is need to configure something equivalent to what I have done when I used “TU_LDD”:

Counter frequency and direction , Mode capture, Capture input pin (PTD2 . J2_4), Input edge, Interrupt ….. etc.

And then use relevant methods provided with the component.

I need clarification on component configuration using component window. The demos that I find are for PWM applications.

Regards

Shaul

0 项奖励
回复
3,439 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shaul,

Up to now , under the KSDK component of "fsl_ftm" can not configure the capture ,

only can use the method to configure by yourself.

While you can use the component of "Init_FTM" under KSDK project :

pastedImage_0.png

Hope it helps


Have a great day,
Alice

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

0 项奖励
回复
3,436 次查看
shauldorf
Contributor V

Hello Alice

When I provide ISR Name using Init_FTM KSDK generates ISR warning .

1. My guess is that ISR name is wrong , but what is a legal name

2. I understand that using your solution I will have to write my own ISR using direct access to F64 "ftm and gpio" registers, is it correct.

3. Do you know any other alternative that saves digging K64 reference manual

Regards

Shaul

0 项奖励
回复
3,436 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shaul,

1. In the KSDK project, the ftm0 interrupt name is FTM0_IRQHandler :

pastedImage_0.png

So if you want use the ksdk in your project, please use this interrupt name.

2. You also can directly configure the PE component on the KSDK :

pastedImage_2.png

3.I only know the PE and KSDK .

Hope it hoelps


Have a great day,
Alice

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

0 项奖励
回复
3,436 次查看
shauldorf
Contributor V

Alice Thanks ,

Before I start I want to validate that I understand your response.

Using Init_FTM only initialize “fsl_ftm” component to input capture mode.

User responsibility is to write all the methods (including ISR).

0 项奖励
回复
3,440 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shaul,

If you use Init_FTM, the interrupt function need write by yourself .

Under this component , there only generate one init function refer to your configuration .

So in  KSDK . you can use the function FTM_SetupDualEdgeCapture() , it can be used to measure the pulse width of a
signal.

Hope it helps
Have a great day,
Alice

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