This directory contains a description of the /dev entries for the quad PWM input peripheral. HARDWARE The quad PWM input peripheral measures the widths of periodic pulses on each of the four pins on a BaseBoard connector. Pulse widths are measured with 16 bits of accuracy for both the high and low periods of a pulse. The clock source driving the pulse width counters ranges from 5 Hertz to 20 MegaHertz. DEVICE NODES The output pulse widths are reported on a single device node which gives all four pulse widths on a single newline terminated line. .../clksrc The frequency of the clock that drives the width counters. A clock frequency of zero turns off the peripheral. The frequency is given in Hertz and must be one of the following: 20000000 10000000 5000000 1000000 500000 100000 50000 10000 5000 1000 500 100 50 10 5 0 .../waveform The clock frequency followed by a comma separated list of values and times between transitions for all four inputs. The values alternate between the four bit value at the input and how long that value (in clock cycles) was held. While more difficult to parse and understand compared to the .../widths data, the raw sample data retains some of the relative phase information captured by the peripheral. The peripheral captures three transitions for each of the four input lines. Each transition has a value and duration measured in clock cycles. If all four pins are active the .../samples output stream will have 24 numbers on each line. Only three transitions on a pin are needed to determine the low and high times (and the thus the frequency and duty cycle). Input from a pin is ignored once all three transitions on it have been recorded. This input masking prevents a fast changing input from overflowing the sample buffer. An 'x' in the example below shows this masking. See the protocol reference manual for more details on the operation of the quad PWM input peripheral. As an example, consider the following partial output line from the .../raw device node for a quad PWM-in peripheral with a 1 MHz clock source: 1000000, 5, 201, 7, 336, 5, 24, 7, 1020, 4, 294, 5, 453, ..... The bits and timing represented in this example are BITS HELD FOR ... MICROSECONDS 0101 201 0111 336 0101 24 0111 1024 01x0 294 01x1 453