BDM-610000075
Rev B
Chapter 4: Using the cpuModule
67
Data Output
Direct Read
The result from the most recent A/D conversion for a specific channel is always available in the AD_RESULT
register within the scan table. The value returned is a 32-bit 2’s complement value with same 76.294 microvolt
resolution for all ranges.
DMA Engine
For data collection operations, a DMA engine is provided that will transfer the data results directly into system
memory. This allows maximum data transfer rate with minimal interaction from the host software. In order to
minimize the effects of interrupt latency, multiple DMA buffers can be defined in a Scatter-Gather Table.
Scatter-Gather Table
The DMA Engine contains a Scatter-Gather Table (SGT) for each of the eight inputs. The Scatter-Gather Table
consists of a list of up to 64 entries. Each entry contains the physical address of a buffer that is 4kB in size, and
4kB aligned. It also contains a flag to indicate that the entry is valid. The Channel 1 Table also includes flags to
stop DMA transfers, restart the SGT, or generate and interrupt. These are flags that effect all channels, and are
only stored in the channel 1 table.
The DMA engine will transfer data using the same row of the SGT and the same offset for all channels. This
guarantees that the captured data is synchronized. The DMA engine will always iterate through the SGT, even if
DMA is not enabled for any channels.
The Scatter-Gather Table is not cleared at power up or during reset. Therefore, software must assume that it
contains random, invalid data.
Operating Modes
Simple Operation
The simplest operating mode is using software to start the sampling and poll the aAIO for the result. This mode
does not require setting up DMA buffers, or setting up the Scatter-Gather Table. In order to use this mode,
perform the following steps:
1.
Open the board as described in
2.
Write channel and input configuration in CGT Register if needed (default is +/-10V, single ended)
3.
Do a software start conversion
4.
Poll A/D done bit (about 20 microseconds) or wait for A/D Done interrupt
5.
Read data from A/D Result
Alternately, the continuous sample bit can be set. In this case, the value read from the A/D Result register is the
last captured sample.
DMA Based Operation
For higher performance sampling, a DMA engine is provided. This engine uses a scatter-gather table for each
channel. The scatter-gather table can have up to 64 entries, each of which is a 4kB buffer that is 4kB aligned. At
the completion of entry of the scatter-gather table, an interrupt can be generated, DMA transfers can be
stopped, and/or the table can be restarted.
Summary of Contents for BDM-610000075
Page 3: ... Accessing the Analog World www rtd com ISO9001 and AS9100 Certified CMX32M cpuModules ...
Page 4: ...iv CMX32M cpuModule BDM 610000075 Rev B ...
Page 30: ...22 CMX32M cpuModule BDM 610000075 Rev B ...
Page 60: ...52 CMX32M cpuModule BDM 610000075 Rev B ...
Page 102: ...94 CMX32M cpuModule BDM 610000075 Rev B ...
Page 116: ...108 CMX32M cpuModule BDM 610000075 Rev B ...