Set FTM MOD in Config Tools FTM general configuration

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

Set FTM MOD in Config Tools FTM general configuration

1,256 次查看
aberger
Contributor V

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.

标记 (3)
0 项奖励
回复
1 回复

807 次查看
marek_neuzil
NXP Employee
NXP Employee

Hello Andy,

Thank you for reporting this request. But the FTM component is based on the fsl_ftm driver API that is provided in the SDK. It is a limitation of the fsl_ftm driver, see the FTM_SetupPwm() function description.

We will process your request as opportunity for improvement of the fsl_ftm driver and FTM component API.

Best Regards,

Marek Neuzil