RL78 Tau input pulse measurement 0% and 100% duty issue

Hi

I am trying to calculate input pulse measurement (frequency) of the pulse.

MY query is when 0 and 100% duty is given by function generator how to calculate the frequency or duty cycle in that case using input capture.

 

Please help 

Thanks in advance