KEAZ128芯片,目前在工程中用了模拟比较器ACMP0,外部通道用的CH1即(PTA1),配置如下图:
另外,工程中还用到FTM0 CH0(PTA0)做EPWM输出,FTM配置如下图:
目前遇到的问题:
开启了ACMP0的ACMPx_C2中ACIPE时(1 允许对应的外部模拟输入),PTA0无法输出PWM。
关闭ACMP0的ACMPx_C2中ACIPE时(0 不允许对应的外部模拟输入)时,PTA0即可正常输出PWM。
看手册中,ACIPE定义为是否允许对应的外部模拟输入,工程中仅选择的ACMP0 ch1(PTA1)做为模拟比较器正极输入,不知为何会对CH0(PTA0)有影响??
Solved! Go to Solution.
Hi @cqhcau
From the information you are providing, by assigning the value of 1 in ACMPx_C2 of ACMP0 what you are enabling is the ACIPE (ACMP Input Pin Enable) analog input 0 (PTA0) not the analog input 1 (PTA1). I advise you to try defining the value of ACMPx_C2 as 2 (or 010 in binary).
B.R.
VaneB
Hi @cqhcau
From the information you are providing, by assigning the value of 1 in ACMPx_C2 of ACMP0 what you are enabling is the ACIPE (ACMP Input Pin Enable) analog input 0 (PTA0) not the analog input 1 (PTA1). I advise you to try defining the value of ACMPx_C2 as 2 (or 010 in binary).
B.R.
VaneB
Thanks,I got it.
The manual and "EmbSys Registers"window in S32DS (enum just have "0" and '"1") confused me.