Hi
I would like to use the PWM Capture feature.
However, there doesn't seem to be a relevant example in the SDK there is only a sample for PWM output.
I noticed there is a Capture API in the Driver, but my attempts so far have not been successful.

I would like to ask if there are any other related samples that I can refer to.
My code is as follows:
int main(void)
{
BOARD_InitHardware();
PRINTF("FlexPWM input capture only\r\n");
pwm_config_t pwmConfig;
PWM_GetDefaultConfig(&pwmConfig);
pwmConfig.pairOperation = kPWM_Independent;
pwmConfig.enableDebugMode = true;
PWM_Init(BOARD_PWM_BASEADDR, kPWM_Module_0, &pwmConfig);
// Setup Input Capture
pwm_input_capture_param_t captureParams = {0};
captureParams.captureInputSel = 0;
captureParams.edge0 = kPWM_RisingEdge;
captureParams.edge1 = kPWM_FallingEdge;
captureParams.enableOneShotCapture = false;
captureParams.fifoWatermark = 0;
captureParams.edgeCompareValue = 0;
PWM_SetupInputCapture(BOARD_PWM_BASEADDR, kPWM_Module_0, kPWM_PwmX, &captureParams);
PWM_StartTimer(BOARD_PWM_BASEADDR, kPWM_Control_Module_0);
while (1)
{
uint16_t captured_cval0 = BOARD_PWM_BASEADDR->SM[kPWM_Module_0].CVAL0;
PRINTF("Capture Value 0 Register: %u\r\n", captured_cval0);
uint16_t captured_cval1 = BOARD_PWM_BASEADDR->SM[kPWM_Module_0].CVAL1;
PRINTF("Capture Value 1 Register: %u\r\n", captured_cval1);
SDK_DelayAtLeastUs(100000, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);
}
}