Hello utkuckmgl@gmail.com,
The reason that this error is caused is related to the fact that you are trying to use the same FTM module, 4 same as input and PWM generator which is not possible in hardware.

The FTM module uses the counter in a different way for PWM generation than for FTM Input Edge Capture. Please select other FTM Module for FTM Input Edge than the module 4 and look after an appropriate PIN.
Hope this helps,
Marius