3.4.10 AVR Data Sampler Enable

Used to enable polling of locations in memory on an AVR target device. Up to 200 locations can be added to the sampling service, but performance will of course degrade as more locations are added. Only AVR devices with UPDI have this capability.

The command will return a handle, which should be used when disabling the polling function afterwards.

Table 3-55. AVR Data Sampler
FieldSizeDescription
DATA_SAMPLER1 byte0x8A
AVR_DATA_ENABLE1 byte0x0B
START_ADDRESS4 byte

Start address to poll, MSB first.

Must be in the range 0x2000 to 0x3FFF.

LENGTH4 byte

Number of bytes to poll, MSB first.

Must be set to 1.

FLAGS4 byte
Bits 1:0: destination:
  • b00: send to DGI as data
  • b01: send to HID (reserved)
  • b10: send to DGI as print
  • b11: reserved

Response:

Table 3-56. AVR Data Sampler Response
FieldSizeDescription
DATA_SAMPLER1 byte0x8A
AVR_DATA_ENABLE1 byte0x0B
Status1 byte

Status code

0x00: OK

0xFF: Error

Handle / error code1 byte

Sampler handle is returned if Status is OK.

Error code is returned if Status is Error.

Error codes:

Table 3-57. AVR Data Sampler Error Codes
Error codeValueDescription
ERROR_FULL0x92Too many poll locations are enabled
ERROR_SIZE_EXCEEDED0x94Buffer memory is full
ERROR_OUT_OF_RANGE0x91The poll location specified is not allowed