CH Tech EM405D user manual Block Access, Starting address + block size * word size

Page 26

Example (values shown hex):

To read the Device Identification Register on the EM405D, send the following command:

Command:

cd

md as

ws

ad

Send:

30

00

00

02

02

Receive:

0F

DB

00

(if successful)

4.3.4Block Access

The EM405D provides a flexible block access feature that can be used to significantly improve data throughput. Both a block read and a block write command is implemented. The flexibility of the bock access feature is in the command protocol. The protocol allows the user to specify four parameters in addition to the standard parameters also found in the single data read and write commands: starting address, block size, number of blocks, and address increment.

The EM405D firmware will execute the command by reading or writing a block of data the size of the block size parameter, starting from the starting address and ending at:

starting address + (block size * word size)

The firmware will then repeat this process N number of times depending on the number of blocks parameter. If the address increment parameter is not equal to 0, the firmware will increment the starting address by the specified amount after each read or write of a single block.

The M-module I/O space is a maximum of 256 bytes. Care must be taken when performing a block access that an address greater than 0xFF is never accessed. Otherwise, an error will occur and the block access will terminate immediately.

The following examples further illustrate the block access feature.

Example 1: Read a single block of 32 words (64 bytes) starting at address 0x4.

starting address = 0x4 block size = 32 number of blocks = 1 address increment = don’t care

Example 2: Read 32 words (64 bytes) from a FIFO at address 0x8.

starting address = 0x8 block size = 1 number of blocks = 32 address increment = 0

Example 3: Read 32 words from two FIFOs one at address 0x8 and another at address 0xA

starting address = 0x8 block size = 2 number of blocks = 32 address increment = 0

20

Image 26
Contents H E R N E T Copyright Copyright 2004 by C&H Technologies, IncDocument Revision Notice Introduction Functional Description Table of Contents General DescriptionInstallation Operating InstructionsEM405D Ethernet M-Module Carrier List of TablesPurpose of Equipment Features and SpecificationsKey Features Specifications Maximum RatingsEnvironmental ElectricalMechanical Bus ComplianceApplicable Documents Installation of M-MODULES Installation Unpacking and InspectionHandling Precautions MA Configuration Diagram Functional Description General Ethernet InterfaceRear Panel Power ConversionModule Interface Front Panel Front PanelPage IP Address Configuring the Ethernet InterfaceOperating Instructions General Recommendation Default subnet mask is GatewayDefault gateway address is Port Numbers Default setting is Auto-Scan Telnet x.x.x.x Performing the Configuration Wireless Ethernet Wi-Fi Page Communicating with the Carrier and M-MODULES Table I. Command SummaryError Handling Table II. Status Code SCPage Write Data command Read Data commandBlock Access Starting address + block size * word sizeNumber of bytes = number of blocks * block size * word size 0x50 md as ws ad ai nh nl bs 5 EM405D Configuration/Status Registers Table III. Register SummaryHardware Version Reset Error & Manufacturer IdentificationDevice Identification Firmware VersionReset & Trigger Control Fan Control & Temperature StatusControlling the Triggers Following values would be invalidFAN and Temperature Control Page Figure A-1 -Pin Dsub Connector Page Appendix B Wired Ethernet Default Settings Table B-1. Ethernet Interface Default SettingsOn Passive Connection True CPU Performance High Page Table C-1. Wireless Ethernet Configuration Default Settings Wireless LAN SettingsCurrent Port Profile TCP Sockets Gpio Page T E S Page Readers Comment Form CommentsInstructions