]> Pileus Git - ~andy/csm213a-hw/commit
Improve time sync accuracy
authorAndy Spencer <andy753421@gmail.com>
Mon, 10 Mar 2014 09:14:40 +0000 (09:14 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 10 Mar 2014 09:14:40 +0000 (09:14 +0000)
commit70a817bdd055b39c1990778594ed97a532748d31
tree3608857528edebbe6fee422b0696006155e39557
parentdec03d99cf30468a4d8a5978c74766f61f15c6de
Improve time sync accuracy

This code is kind of messy, but it is more accurate.

Noise between time syncs seems to be around 50 nanoseconds. Noise on
external event readings seems to be around 500 nanoseconds. External
events were tested by manually inserting pins.

The mbeds seems to be consistency apart on external events, so some of
the noise could be caused by differing thresholds on the wires. Rising
edge mode on mbed seems to be ahead, and in falling edge the other is
ahead.

A large portion of the measurement errors was caused by not properly
learning pending DMA requests before enabling the DMA channels. The
pending requests seem to need to be disabled in the DMAMUX as well as
the DMA controller, and on the pins as well. It's not clearly what the
idea reset method is.
hw2/main.cpp
hw2/serial_irq.c
hw2/serial_irq.h
hw2/test.cpp
hw2/timer_dma.c
hw2/timer_dma.h