This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to measure two wave delay?

I have two square waveforms coming out of a pin each. I want to measure the delay between them. Which command should I use? How can I do this?

Parents Reply Children
  • Oh yes ... But I want the microcontroller itself to measure this delay between waves. It is possible? How can I do it? And which command should I use?

  • Why would you do it? Even if MCU would do this for you there will be jitter caused by clock cycles needed to perform the instructions so it will be inaccurate. And what kind of "command" you expect? You think that ARM Cortex-M MCU worth 1~2USD in big volumes is running some fancy OS which allows you to communicate with it in "commands"?:) To do ANYTHING with such deeply embedded system YOU need to develop FW (it's kind of misleading to speak about OS;), load it to it and then use interfaces and protocols you've implemented in your FW source code.

Related