Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler...

12
Basler BCON Control Protocol – Additional Information Document Number: AW001405 Version: 01 Language: 000 (English) Release Date: 14 December 2016

Transcript of Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler...

Page 1: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

Basler BCON Control Protocol – Additional Information

Document Number: AW001405 Version: 01 Language: 000 (English) Release Date: 14 December 2016

Page 2: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

Contacting Basler Support Worldwide

Europe, Middle East, Africa

Basler AG An der Strusbek 60–62 22926 Ahrensburg Germany

Tel. +49 4102 463 515 Fax +49 4102 463 599

[email protected]

The Americas

Basler, Inc. 855 Springdale Drive, Suite 203 Exton, PA 19341 USA

Tel. +1 610 280 0171 Fax +1 610 280 7608

[email protected]

Asia-Pacific

Basler Asia Pte. Ltd. 35 Marsiling Industrial Estate Road 3 #05–06 Singapore 739257

Tel. +65 6367 1355 Fax +65 6367 1255

[email protected]

www.baslerweb.com

All material in this publication is subject to change without notice and is copyright Basler AG.

Page 3: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 1

Table of Contents

1 Target Audience ...................................................................................................................... 2

2 General Information ................................................................................................................ 2

3 Basler BCON Control Protocol .............................................................................................. 3

3.1 GenCP BCON Prefix ................................................................................................... 3 3.2 GenCP BCON Postfix .................................................................................................. 3 3.3 GenCP Command IDs ................................................................................................. 3

4 Sample I2C Transaction .......................................................................................................... 4

4.1 GenCP Command (without Start, Stop, and ACK Bits)............................................... 4 4.2 GenCP Acknowledge (without Start, Stop, and ACK Bits) .......................................... 4

5 Considerations When Reading Data from the Device ......................................................... 5

6 Bootstrap Register Map (BRM) .............................................................................................. 5

6.1 Technology Agnostic Bootstrap Register Map (ABRM) .............................................. 5 6.2 Technology Specific Bootstrap Register Map (SBRM) ............................................... 8

Page 4: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 2

1 Target Audience

This document is aimed at experienced hardware and software engineers proficient in electronics, software development, and embedded system design.

The document assumes that users have significant experience in programming with the GenICam generic programming interface (see http://www.emva.org/standards-technology/genicam) and are familiar with the GenCP 1.2 specification (see Chapter 2).

2 General Information

Basler BCON cameras are configured via a standard I2C interface. The cameras are GenICam devices and use GenCP (Generic Control Protocol), version 1.2, as their low level protocol.

All information given in this document is based on the GenCP 1.2 specification: http://www.emva.org/wp-content/uploads/GenICam_GenCP_1.2.pdf

Page 5: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 3

3 Basler BCON Control Protocol

3.1 GenCP BCON Prefix

To communicate with a Basler BCON camera, you must use the following prefix:

Width (Bytes) Offset (Bytes) Description

4 0 0x434C5356

Contains the ASCII string “VSLC”, short for Versatile Serial Link Control (with “V” in the LSB).

Table 1: GenCP BCON Prefix

3.2 GenCP BCON Postfix

Each GenCP command and each GenCP acknowledge uses a CRC-16 code as postfix. To communicate with a Basler BCON camera, you must use the following postfix:

Width (Bytes) Offset (Bytes) Description

2 0 CRC-16 code

Contains the CRC-16 with LSB first. Includes the prefix, CCD and SCD data. The generator polynom used is 0x8005.

Table 2: GenCP BCON Postfix

3.3 GenCP Command IDs

Basler BCON cameras support the following command IDs:

READMEM_CMD

READMEM_ACK

WRITEMEM_CMD

WRITEMEM_ACK

PENDING_ACK

Basler BCON cameras do not support the following command IDs:

EVENT_CMD

EVENT_ACK

Page 6: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 4

4 Sample I2C Transaction

The following pseudo data structure describes the I2C data stream initiated from the I2C master.

4.1 GenCP Command (without Start, Stop, and ACK Bits)

I2C Address (write)

Prefix (“VSLC”) Payload (GenCP CMD) Postfix

(CRC16)

Table 3: GenCP Command Pseudo Data Structure

The following image shows an I2C dump of a valid I2C write request.

As an example, the GenCP READMEM_CMD for the Maximum Device Response Time register is used.

4.2 GenCP Acknowledge (without Start, Stop, and ACK Bits)

I2C Address

(read)

Prefix (“VSLC”) Payload (GenCP ACK) Postfix

(CRC16)

Table 4: GenCP Acknowledge Pseudo Data Structure

The following image shows an I2C dump of a valid I2C read request.

As an example, the GenCP READMEM_ACK for the Maximum Device Response Time register is used.

Page 7: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 5

5 Considerations When Reading Data from the Device

Before issuing a read command, the I2C master must send a valid GenCP command. Otherwise, the device will return a 0xFF value for each requested byte.

If the I2C master requests more data than the device is able to return, the following occurs: 1. The device returns the data that the device is able to return. 2. The device returns a 0xFF value for each further byte until the read request is finished.

6 Bootstrap Register Map (BRM)

Based on the GenCP standard, the total BRM is divided into two parts:

1. The Technology Agnostic Bootstrap Register Map (ABRM) 2. The Technology Specific Bootstrap Register Map (SBRM).

The next sections describe both register maps.

6.1 Technology Agnostic Bootstrap Register Map (ABRM)

The Technology Agnostic Bootstrap Register Map (ABRM) uses the first 64 kB of the register space.

The ABRM shown below (see Table 5) is exactly the same as the ABRM described in the GenCP 1.2 specification, with the following exceptions:

The Heartbeat Timeout register is not used.

The Message Channel ID register is not used.

The Access Privilege register is not used.

Accessing these registers will return a GENCP_INVALID_ADDRESS status code.

For more information, refer to Chapter 5 in the GenCP 1.2 document: http://www.emva.org/wp-content/uploads/GenICam_GenCP_1.2.pdf

Table definitions

Width: Size of the register in bytes

Offset: Address of the register in the device’s BRM

Support: M = Mandatory / R = Recommended / CM = Conditional Mandatory (depending on the capability bits)

Access: R = Read-only, W = Write-only, RW = Read/Write

Description: Name and short description

Page 8: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 6

Width

(Bytes)

Offset

(Bytes)

Support Access Description

4 0x00000 M R GenCP Version

Complying GenCP specification version.

64 0x00004 M R Manufacturer Name

String containing the self-describing name of the manufacturer.

64 0x00044 M R Model Name

String containing the self-describing name of the device model.

64 0x00084 CM R Family Name

String containing the name of the family of this device.

64 0x000C4 M R Device Version

String containing the version of this device.

64 0x00104 M R Manufacturer Info

String containing additional manufacturer information.

64 0x00144 M R Serial Number

String containing the serial number of the device.

64 0x00184 CM RW User Defined Name

String containing the user defined name of the device.

8 0x001C4 M R Device Capability

Bit field describing the device’s capabilities. See note below.

4 0x001CC M R Maximum Device Response Time

Maximum response time in ms.

8 0x001D0 M R Manifest Table Address

Pointer to the Manifest Table.

8 0x001D8 CM R SBRM Address

Pointer to the Technology Specific Bootstrap Register Map.

8 0x001E0 M RW Device Configuration

Bit field describing the device’s configuration.

Page 9: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 7

Width

(Bytes)

Offset

(Bytes)

Support Access Description

4 0x001E8 CM RW Heartbeat Timeout

Heartbeat Timeout in ms. Not used by the Basler BCON interface.

4 0x001EC CM RW Message Channel ID

channel_id used for the message channel.

Not used by the Basler BCON interface.

8 0x001F0 CM R Timestamp

Last latched device time in ns.

4 0x001F8 CM W Timestamp Latch

8 0x001FC CM R Timestamp Increment

4 0x00204 CM RW Access Privilege

Not used by the Basler BCON interface.

4 0x00208 Reserved

Deprecated Protocol Endianness, do not reuse.

4 0x0020C CM R Implementation Endianness

Endianness of device implementation registers.

65008 0x00210 M no Reserved Register Space

Table 5: Technology Agnostic BRM

The Device Capability register is set to 0xE09. As specified in the GenCP 1.2 standard, this value indicates the following:

Access Privilege Available: Unavailable (not used by the Basler BCON standard)

Timestamp Supported: Available (required by the Basler BCON standard)

String Encoding: 0x0 ASCII (required by the Basler BCON standard)

SBRM Supported: Available (required by the Basler BCON standard)

Written Length Field Supported: Available (required by the Basler BCON standard)

Page 10: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 8

6.2 Technology Specific Bootstrap Register Map (SBRM)

The SBRM must start on a free manufacturer-specific address space after address 0xFFFF.

Table definitions

Width: Size of the register in bytes

Offset: Address of the register in the device’s BRM

Support: M = Mandatory / R = Recommended / CM = Conditional Mandatory (depending on the capability bits)

Access: R = Read-only, W = Write-only, RW = Read/Write

Description: Name and short description

Width

(Bytes)

Offset

(Bytes)

Support Access Description

4 SBRM M R BCON Version

Version of the Basler BCON standard that the Bootstrap Register Map complies with.

16 SBRM +

0x04

M Reserved

Reserved register space.

4 SBRM +

0x14

M R Maximum Command Transfer Length

The maximum supported command transfer length of the device.

4 SBRM +

0x18

M R Maximum Acknowledge Transfer Length

The maximum supported acknowledge transfer length of the device.

4 SBRM +

0x1C

M RW Prepare Access

Writing any value to this register will re-initialize the camera. If the camera is currently acquiring images, image acquisition and data transmission will be stopped.

4 SBRM +

0x20

M R Clock Frequency

The Basler BCON clock frequency in Hertz. The value can range from 12000000 (12 MHz) to 84000000 (84 MHz).

4 SBRM +

0x24

M R Pixels Per Clock Cycle

The number of pixels transmitted per clock cycle via the Basler BCON interface.

4 SBRM + M R Width

Page 11: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 9

Width

(Bytes)

Offset

(Bytes)

Support Access Description

0x28 The current width of the region of interest in pixels.

4 SBRM +

0x2C

M R Height

The current height of the region of interest in pixels.

4 SBRM +

0x30

M R Pixel Format

The current SFNC pixel format.

Table 6: Technology Specific BRM

Page 12: Basler BCON Control Protocol – Additional Information · 2018. 2. 2. · AW00140501000 Basler BCON Basler BCON Control Protocol – Additional Information 5 5 Considerations When

AW00140501000 Basler BCON

Basler BCON Control Protocol – Additional Information 10

Revision History

Document Number Date Changes

AW00140501000 14 Dec 2016 Initial release version of this document.