KEAZ128 模拟比较器ACMP0疑问

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

KEAZ128 模拟比较器ACMP0疑问

Jump to solution
924 Views
cqhcau
Contributor I

    KEAZ128芯片,目前在工程中用了模拟比较器ACMP0,外部通道用的CH1即(PTA1),配置如下图:
   另外,工程中还用到FTM0 CH0(PTA0)做EPWM输出,FTM配置如下图:

cqhcau_0-1654678851722.png

 

 

cqhcau_1-1654678851733.png

cqhcau_2-1654678851718.png

cqhcau_3-1654678851720.png
cqhcau_4-1654678851707.png   

目前遇到的问题:
   开启了ACMP0的ACMPx_C2中ACIPE时(1 允许对应的外部模拟输入),PTA0无法输出PWM。
   关闭ACMP0的ACMPx_C2中ACIPE时(0 不允许对应的外部模拟输入)时,PTA0即可正常输出PWM。
   看手册中,ACIPE定义为是否允许对应的外部模拟输入,工程中仅选择的ACMP0 ch1(PTA1)做为模拟比较器正极输入,不知为何会对CH0(PTA0)有影响??

0 Kudos
1 Solution
915 Views
VaneB
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
2 Replies
916 Views
VaneB
NXP TechSupport
NXP TechSupport

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

0 Kudos
908 Views
cqhcau
Contributor I

Thanks,I got it.

The manual and "EmbSys Registers"window in S32DS (enum just have "0" and '"1") confused me.

cqhcau_0-1654818483902.png

 

cqhcau_1-1654818508165.png

 

0 Kudos