Hello,
If you want to get better results, I suggest you to check the example "ftm_input_capture_s32k14x" included in the toolbox. It uses the FTM peripheral to get the timestamp of the channel input event. The timestamp is computed based on the System Clock (80 MHz).
Example: If the timestamp is 2000 (with the Prescale Factor of 2) it means that the frequency of the PWM signal is System_Clock / (Timestamp * Prescale_Factor) = 80 MHz / (2000 * 2) = 80000 kHz / 4000 = 20 kHz.
Let me know if this solution works for you.
Yours faithfully,
Bancila Sorin
PS: Whenever you need to have fast execution time, the Freemaster can add a lot of overhead. In order to solve this problem, you can go to Freemaster and select the Sampling period of the variable you want to monitor to Once. In the model, you need to add the Freemaster_Poll_Call block to update the variable. You can add this block in a Triggered Subsystem and then use timers (e.g PIT) to execute at a slower pace (e.g. 1 sec).