keaz128 FTM0 CH0 EPWM cnv更新问题

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

keaz128 FTM0 CH0 EPWM cnv更新问题

跳至解决方案
2,264 次查看
cqhcau
Contributor I

目前使用PTA0脚做EPWM输出 (ADC0_SE0/KBI0_P0/FTM0_CH0/ACMP0_IN0/PTA0),时钟采用固定频率时钟:
采用官方库,配置如下:

cqhcau_0-1654678607679.png

 

                    

cqhcau_1-1654678607689.png

 

 

cqhcau_2-1654678607671.png

             cqhcau_3-1654678607701.png



目前碰到的问题:
1) 更新FTM0通道 CxV值时,在溢出中断中更新,如果不开启通道中断,则CxV可正常更新;如果开启了通道中断,CxV则无法更新;
这个问题该如何解决?

0 项奖励
回复
1 解答
2,212 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @cqhcau 

As the reference manual says the only one FTM module fulfils the complete functionalities:  

“one 6-channel FTM with full functions and two 2-channel FTM with basic TPM functions”.

This is why I recommend you to use the FTM2 module.

 

B.R.

VaneB

在原帖中查看解决方案

0 项奖励
回复
5 回复数
2,248 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @cqhcau 

From the information you are providing, I advise you to try to disable the write protection (WPDIS = 1), this can let you modify the write protected bits during the process, this would allow you to change the channel value in the task.

 

B.R.

VaneB

0 项奖励
回复
2,242 次查看
cqhcau
Contributor I

Thanks First. I noticed that FTM0 of keaz128 just have 8 Regs I mentioned in the picture which the same as "TPM",and without "MODE" Reg to set the "WPDIS".

0 项奖励
回复
2,223 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @cqhcau 

Looking at the Reference Manual that you can obtain with this link KEA128RM, at the chapter 26.3.10 (page 385), it shows the register MODE were is located the WPDIS as it’s shows in the image. Please make sure that the write protection is disabled.

VaneB_0-1655237440943.png

 

VaneB_1-1655237440979.png

 

B.R.

VaneB

0 项奖励
回复
2,218 次查看
cqhcau
Contributor I

Hi:

   The Reference Manual(Table3-34.) show that FTM0/FTM1 only have 8 Registers available.

I've tried FTM2 and it can work normally.I can see the code of FTM2 is different  with FTM0/FTM1.

cqhcau_0-1655251116238.png

cqhcau_1-1655251910522.png

 

 

0 项奖励
回复
2,213 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @cqhcau 

As the reference manual says the only one FTM module fulfils the complete functionalities:  

“one 6-channel FTM with full functions and two 2-channel FTM with basic TPM functions”.

This is why I recommend you to use the FTM2 module.

 

B.R.

VaneB

0 项奖励
回复