Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Using the Device Buffer VIs (Blackfin, Embedded Module)

Buffers store either inbound or outbound data. The different device drivers share the following common buffer VIs:

The device drivers in the Embedded Module for Blackfin Processors use the BF Device Initialize Buffer VI to create the device buffers. You can configure buffers as one-dimensional, two-dimensional, circular, or sequential one-dimensional. The type of buffer you choose depends on the device type and how you are processing the data.

With one-dimensional buffers and linear direct memory access (DMA), data moves in a one-dimensional, linear manner, which is the most common type of transfer. n elements of w width move from one location, or in through a device, to another memory location, or out through a device.

Use two-dimensional DMA to transfer data in a non-linear fashion, which is useful in video applications. Two-dimensional DMA supports arbitrary row and column sizes up to 64 K x 64 K, and row and column modify values up to +/– 32 KB.

Circular buffers use the autobuffer capability of the DMA controller. Using the circular transfer mode, the client provides the DMA Manager with a single, contiguous buffer comprising n sub-buffers. When you enable data flow, the DMA Manager begins transferring data at the start of the buffer, continues throughout the entire buffer, loops back to the top of the buffer, and repeats indefinitely. The client can optionally direct the DMA Manager to generate callbacks at the completion of each sub-buffer, to generate callbacks at the completion of the entire buffer, or not to generate callbacks at all.

A sequential, one-dimensional buffer is a concatenation of a standard one-dimensional buffer with a direction field appended to the end of the standard buffer. Set the direction to inbound if the buffer receives data from the device. Set the direction to outbound if the buffer transmits data to the device.

Refer to the VisualDSP++ 4.5 Device Drivers and System Services Manual for Blackfin Processors on the Analog Devices Web site at www.analog.com for information about the different buffer types.

Pass the buffer reference output of the BF Device Initialize Buffer VI to the BF Device Read VI, if the device receives external data, or the BF Device Write VI, if the device sends data externally, to queue the buffer.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit