Hi,
From your description, it seems that your application is reaching the timing limits...
I suggest to measure the time of processing code for the values itself (without any capture or ADC), if it's short enough to get between the lowest intervals that can occur. If not, you would need to optimize it or change the micro-controller to something more powerful.
If it's OK, the possible directions of improvement could be the following :
1. Try to increase optimization level of the compiler.
2. Use Init_ADC component instead of ADC, configure it and select "Continuous conversion" mode. This means that ADC performs continuously and you can just grab results from the ADC result register (ADCRH, ADCRL). This would allow to avoid some overhead in ADC functions
3. Disable interrupts in capture components and read both of them it in periodic manner using method GetCaptureValue. For example in some periodic timer interrupt or elsewhere. This period would have to be lower than the lowest period of the signal.
4. Use Init_TPM component, add there two channels and set them for capture and then write you own code directly handling the TPM registers to avoid overhead in 'Capture' component code.
Best regards
Petr Hradsky
Processor Expert Support Team