Hello Community
We want to detect the Crash signal input and configure it according to the example, but there is no return value of IC_GETMEASUREMENT (), please help us to check whether we made a mistake in the configuration.
Chip version:S32K148 -> 144
PIN: PTD18
Hardware environment: SRS analog input
Config: FTM5_CH7
for example: ic_pal_s32k148
MCU detects CRASH signal input,
uint16_t inputCaptureMeas = 0U;
uint16_t inputMeas = 0U;
uint32_t frequency;
uint8_t channel = ic_pal1_ChnConfig->hwChannelId;
IC_Init(&ic_pal1_instance, &ic_pal1_InitConfig);
while(1)
{
frequency = FTM_DRV_GetFrequency(ic_pal1_instance.instIdx);
inputCaptureMeas = IC_GetMeasurement(&ic_pal1_instance, channel);
inputMeas = frequency / (inputCaptureMeas);
JPCC_DEBUG(JPCC_LOG_LEVEL_WARNING, "[ SensorApp] 6 PWM uFrequencyHZ=[%lu], frequency=[%lu], inputCaptureMeas=[%u], inputMeas=[%lu]\r\n",
flexTimer_pwm1_PwmConfig.uFrequencyHZ, frequency, inputCaptureMeas, inputMeas);
OS_sleep(300);
};
Hello,
Could you please attach the project?
The issue could be in the PIN driver, for example.
Can you scope the signal on PTD18?
Thank you,
BR, Daniel