FTM Quad Decoder will not interrupt on time overflow

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

FTM Quad Decoder will not interrupt on time overflow

跳至解决方案
3,435 次查看
aberger
Senior Contributor I

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 解答
3,132 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

4 回复数
3,132 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

3,132 次查看
aberger
Senior Contributor I

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 项奖励
回复
3,133 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

3,132 次查看
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 项奖励
回复