keaz128 FTM0 CH0 EPWM cnv更新问题

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

keaz128 FTM0 CH0 EPWM cnv更新问题

Jump to solution
1,430 Views
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 Kudos
1 Solution
1,378 Views
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

View solution in original post

0 Kudos
5 Replies
1,414 Views
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 Kudos
1,408 Views
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 Kudos
1,389 Views
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 Kudos
1,384 Views
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 Kudos
1,379 Views
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 Kudos