AnsweredAssumed Answered

Set FTM MOD in Config Tools FTM general configuration

Question asked by Andy Berger on May 18, 2018
Latest reply on May 21, 2018 by Marek Neuzil

In MCUXpresso Config Tools, when an FTM peripheral is configured, the user is asked to specify the "Timer output frequency [Hz]" as an integer value. Since the FTM is a counter, not all output frequencies will be exact integers. It would actually be more helpful to be able to specify the count modulus, and have the config tool report the count frequency (in Hz, as a float). This way, there are no rounding errors in setting the MOD based on an integer frequency that might not be accessible.


Furthermore, it can be helpful for downstream calculations to set the MOD as a power of 2. For example, I would like to set the count MOD to 2^12 = 4096. On a 60 MHz system clock, this results in an FTM frequency of 14,648.4375 Hz. This is obviously non-integer, and thus not settable from within Config Tools. As a result, I have to manually add code to correct the FTM MOD outside of peripherals.c code generated by Config Tools.