FTM Quad Decoder will not interrupt on time overflow

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

FTM Quad Decoder will not interrupt on time overflow

Jump to solution
1,170 Views
aberger
Contributor V

I am initializing an FTM module using MCUXpresso Config Tools (v4.0) in Quadrature Decoder Mode, and setting CNTIN = 0 and MOD = 399. I have checked "Time overflow interrupt" and "Enable interrupt request" to generate an interrupt each time the counter wraps around from MOD to CNTIN. However, Config Tools will not generate the code: 

FTM_EnableInterrupts(FTM_2_PERIPHERAL, kFTM_TimeOverflowInterruptEnable);

when I toggle "Time overflow interrupt", so I have had to add it manually. This is dangerous, since peripherals.c will be overwritten by future changes to the initialization from Config Tools.

This seems to be a bug with Config Tools, since it does generate the FTM_EnableInterrupts() command for FTM channels that are not set up in Quadrature Decoder Mode.

1 Solution
867 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Andy,

The development team said this will fixed in the next MCUXpresso Config Tool version :

MCUXCON 5.0 DATA PRC1
Now we can only  add the enable interrupt code by hand for a workaround .
Sorry for the inconvenient to you .


Have a great day,
TIC

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

View solution in original post

4 Replies
867 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Andy Berger,

Please tell me which chip ? And the version of SDK you used?

I use K64 chip, MCUXpresso configure Tool v4.0, it can work well.

After enable interrupt, we can find the generate code in "FTM_1_init()" function:

pastedImage_1.png

BTW, I recommend you use the latest version MCXpresso Configure Tool v4.1 and SDKv2.4 .


Have a great day,
TIC

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

867 Views
aberger
Contributor V

Hi Alice. I too am using a K64 and Config Tools 4.0 (I haven't upgraded yet since I'm mid-project).

However, I noticed you don't have FTM_1 set up in Quadrature Decoder Mode. Only in that mode do I experience this issue. Config Tools will generate the FTM_EnableInterrupts() command for an FTM set up in Edge-Aligned Mode, e.g.

Can you check if your Config Tools will generate the FTM_EnableInterrupts() command if the FTM is set up as a Quad Decoder?

0 Kudos
868 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Andy,

The development team said this will fixed in the next MCUXpresso Config Tool version :

MCUXCON 5.0 DATA PRC1
Now we can only  add the enable interrupt code by hand for a workaround .
Sorry for the inconvenient to you .


Have a great day,
TIC

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

867 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Andy,

Thanks for your sharing, I report it to development team.

Will let you know once I get reply.

Have a nice day,

Alice

0 Kudos