m451 PWM1_CH4 捕获不了。
进入不了这个中断,void PWM1P1_IRQHandler(void)
应该要如何处理?
/* set PWM1 channel 4 capture configura
tion */
PWM_ConfigCaptureChannel(PWM1, 4, 69, 0);
/* Enable capture falling edge interrupt for PWM1 channel 4 */
PWM_EnableCaptureInt(PWM1, 4, PWM_CAPTURE_INT_FALLING_LATCH);
/* Enable PWM1 NVIC interrupt */
NVIC_EnableIRQ(PWM1P1_IRQn);
/* Enable Timer for PWM1 channel 2 */
PWM_Start(PWM1, PWM_CH_4_MASK);
/* Enable Capture Function for PWM1 channel 4 */
PWM_EnableCapture(PWM1, PWM_CH_4_MASK);
/* Enable falling capture reload */
PWM1->CAPCTL |= PWM_CAPCTL_FCRLDEN4_Msk;
void PWM_EnableCapture(PWM_T *pwm, uint32_t u32ChannelMask);