Hi, Cristi,
Regarding your question how to connect the HC-SR04 Sensor to the FRDM-Kl25Z board, as you know that the HC-SR04 has four pins: VCC,GND,Trig,Echo. Firstly, the HC-SR04 use 5V logic, while the FRDM-Kl25Z uses 3.3V logic, you have to use the external open drain circuit such as 74LS05/06 to do the logic conversion, another anternative is to change KE family for example FRDM-KE06Z, the KE family is 5V logic.
Regarding the signal connection, I think you can connect the Trig signal of sensor to GPIO pin of Kinetis, connect the ECHO signal to the TPM or FTM channel.
for the software, you can set GPIO, delay some time, clear the GPIO, it is okay to generate the trigger signal. The TPM and FTM channel pin has capture function, you can set TPM/FTM in rising/falling edge triggering, once an edge of TPM/FTM channel is detected, the counter value of TPM/FTM will be latched to the CnV register automatically, an interrupt is triggered, in the ISR, you can read the CnV register and get the difference of two consecutive ISR, it is the pusle width.
Hope it can help you.
BR
Xiangjun Rong