目前使用PTA0脚做EPWM输出 (ADC0_SE0/KBI0_P0/FTM0_CH0/ACMP0_IN0/PTA0),时钟采用固定频率时钟:
采用官方库,配置如下:
目前碰到的问题:
1) 更新FTM0通道 CxV值时,在溢出中断中更新,如果不开启通道中断,则CxV可正常更新;如果开启了通道中断,CxV则无法更新;
这个问题该如何解决?
Solved! Go to Solution.
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
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
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".
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.
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