keaz128 FTM0 CH0 EPWM cnv更新问题

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

keaz128 FTM0 CH0 EPWM cnv更新问题

ソリューションへジャンプ
1,989件の閲覧回数
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 解決策
1,937件の閲覧回数
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 返答(返信)
1,973件の閲覧回数
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 件の賞賛
返信
1,967件の閲覧回数
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 件の賞賛
返信
1,948件の閲覧回数
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 件の賞賛
返信
1,943件の閲覧回数
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 件の賞賛
返信
1,938件の閲覧回数
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 件の賞賛
返信