kinetis FRDM-K22F tpm

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

kinetis FRDM-K22F tpm

跳至解决方案
1,120 次查看
kentgu
Contributor III

hi,

Now I want to realize PWM output using FRDM-K22F tpm to with IAR. In "c:\Freescale\KSDK_1.3.0\Examples\frdmk22f\driver_example" folder, there is no tpm demo project. I copy the project"c:\Freescale\KSDK_1.3.0\Examples\frdmk22f\driver_example\gpio", and move the content of main.c from "c:\Freescale\KSDK_1.3.0\Examples\frdmkl02z\driver_example\tpm".

I just copy

"

volatile uinit32_t cnt = 0;

int32_t setp = 1;

tpm_general_config_t driverInfo;

"

report the error "Error[Pe020]:identifier "tpm_general_config_t" is undefined.

I try several solution, still can't solve it.

#1,Include "fsl_tpm_driver.h" in the top side of main.c because :tpm_general_config_t" is defined in the "fsl_tpm_driver.h", can't work.

#2, In"ksdk_platform_lib" increase "tpm" folder, the folder include "fsl_tpm_common.c", "fsl_tpm_driver.c",fsl_tpm_driver.h", fsl_tpm_hal.c", "fsl_tpm_hal.h". And make new "libksdk_platform.a", can't work.    

Any reply is appreciated.

thanks!

Kent

0 项奖励
回复
1 解答
969 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kent gu,

      Actually, KSDK1.3.0 have the PWM code, it is not TPM, just FTM, K22F have FTM module, not named as TPM, FTM is the enhanced TPM module.

    Please run the code in path: C:\Freescale\KSDK_1.3.0\examples\frdmk22f\driver_examples\ftm

    This is the code which you need.

Wish it helps you!

Have a great day,

Jingjing

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

在原帖中查看解决方案

1 回复
970 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kent gu,

      Actually, KSDK1.3.0 have the PWM code, it is not TPM, just FTM, K22F have FTM module, not named as TPM, FTM is the enhanced TPM module.

    Please run the code in path: C:\Freescale\KSDK_1.3.0\examples\frdmk22f\driver_examples\ftm

    This is the code which you need.

Wish it helps you!

Have a great day,

Jingjing

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