armembeddedmicrochipatmelsam

Imprecise pulse width capture using Atmel SAM D51


We are using an ATSAMD51P19A and the Timer/Counter for Control Applications (TCC) to detect the pulse width from the assertion of a pin to the detection of a signal on another pin, and are having trouble achieving our desired resolution of +/- 10 nsec.

The below block diagram shows our Atmel START configuration to capture the pulse width.

enter image description here

Using a delay generator, we know the time delta from the assertion of the pin PA23 to the rising edge of the pin PA22 is 720 nsec +/- 5 nsec. Given our configuration, we expect that we should capture a pulse width of 720 nsec +/- 10 nsec. However, we are seeing 720 nsec +/- 50 nsec. Our application requires +/- 10 nsec, so the +/- 50 nsec is undesirable.

We have tried many configurations and have been unable to achieve an accuracy of less than +/- 50 nsec. Any suggestions or feedback on how to achieve a higher resolution is greatly appreciated.


Solution

  • We resolved our own issue.

    The root cause of our problem was an oscillation on the MCU_VDDCORE/MCC_VSW supply rails of the ATSAMD51P19A, which was caused by the the low capacitor value connected to the MCU_VDDCORE/MCU_VSW circuit.

    By adding a larger capacitor to the MCU_VDDCORE/MCU_VSW circuit, we removed the oscillation, which in turn solved our timing issue. Our variance went from +/- 50 nsec to +/- 10 nsec.