fsl_ftm KSDK v1.3 setup

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

fsl_ftm KSDK v1.3 setup

Jump to solution
1,034 Views
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

Labels (1)
0 Kudos
1 Solution
747 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

7 Replies
747 Views
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 Kudos
747 Views
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 Kudos
747 Views
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 Kudos
746 Views
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 Kudos
746 Views
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 Kudos
746 Views
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 Kudos
748 Views
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!
-----------------------------------------------------------------------------------------------------------------------