Hello filippo,
You have not clarified whether you are using any form of mechanical switch to provide the input signal. All mechanical switches do bounce to varing degrees, and it is possible that both edges can spuriously occur at each transition.
For test purposes, you might set the channel to detect both edges, and then see how many times the channel flag becomes set after a single switch transition. This test can be done outside of the channel ISR. Simply provide a tight loop, while waiting for the the channel flag to become set. Once it is set, clear the flag, read and store the capture value (perhaps within an array), and then wait for the next capture event.
If there is more than a single reading for each transition, you have bounce occurring. The sequence of capture values will indicate the timing of any bounce.
Regards,
Mac