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.
Solved! Go to Solution.
Hello Andy,
The development team said this will fixed in the next MCUXpresso Config Tool version :
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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:
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!
-----------------------------------------------------------------------------------------------------------------------
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?
Hello Andy,
The development team said this will fixed in the next MCUXpresso Config Tool version :
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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