Voltage difference between input capture pin and GND

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Voltage difference between input capture pin and GND

1,642 次查看
AjRj14
Contributor III

Hi,

I am using s32k144evb.

I have assigned PTD15 as input capture pin.

The observation I came across is the voltage difference between PTD15 and GND is 5V when no PWM input is given to PTD15. When a PWM is given, an offset of 0.7V is observed.

The driver settings are as below:

PCC->PCCn[PCC_FLEXTMR0_INDEX] = PCC_PCCn_PCS(6) | PCC_PCCn_CGC_MASK;; //Select and enable clock for FTM0
PCC->PCCn[PCC_PORTD_INDEX] = PCC_PCCn_CGC_MASK; //Enable clock for PORTD
PORTD->PCR[15] = PORT_PCR_MUX(2); // Set PTD15 for FTM0 - Channel0
FSL_NVIC->ISER[FTM0_Ch0_Ch1_IRQn / 32] |= (1 << (FTM0_Ch0_Ch1_IRQn % 32)); // Enable FTM0 interrupt FTM0_Ch0_Ch1_IRQn
FSL_NVIC->IP[FTM0_Ch0_Ch1_IRQn / 32] =0x0A;
FTM0->CONTROLS[0].CnSC = FTM_CnSC_ELSAB_MASK | FTM_CnSC_CHIE_MASK; //Input capture mode sensitive on rising and falling edge to measure period/duty of tested signalFTM_CnSC_ELSA_MASK | FTM_CnSC_CHIE_MASK;
FTM0->CNT = 0; // Reset counter
FTM0->SC = 0x0000010C; // Select clock

 

Could you please let me know why input capture pin is driving high voltage?

0 项奖励
回复
1 回复

1,624 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

Could you please check EVB schematic? The pin PTD15 is connected via R154 and R97 and RGB_RED to VDD.

Best regards,

Ladislav

 

0 项奖励
回复