1.17.8 Get Memory Range Command

This command will request the memory range for a specific memory region on the device. The specific memory region will be placed in the "Address" field. This field should be populated with 0 if only one memory region is supported. The device will respond with the start and end address of the programmable memory range. This will allow the programmer to determine what ranges are supported and allow the programmer to filter out all other memory addresses.

Field Size

Description

Data Type

Comments

1

Command

uint8_t

Command (0x0B) - Get Memory Address Range

2

Length

uint16_t

0x8. Length of the response.

4

Unlock Sequence

uint32_t

0x00

4

Address

uint32_t

Which memory range. 0x0 is default for a device with just single flash.

Get Memory Address Range Command Response Format

Field Size

Description

Data Type

Comments

1

Command

uint8_t

Command (0x0B) - Get Memory Address Range

2

Length

uint16_t

8 -Number of bytes to read.

4

Unlock Sequence

uint32_t

0 Unlock sequence for flash. Key for currently supported parts is 0x00AA0055

4

Address

uint32_t

Which memory range. 0x0 is default for a device with just single flash.

1

Status

uint8_t

Status of Command
  • 0x01 Success
  • 0xFF Unsupported command
  • 0xFE Invalid Address
  • 0xFD Invalid Length
4Program Flash Startuint32_tExecutable image start address
4Program Flash Enduint32_tExecutable image end address

Get Memory Address Range Example Sequence

Get Address Range of flash. StartAddress = 0x2000 End Address = 0AB7FE. All values in Hex

Example command to the device

Field Size

Description

Data Type

Value

1

Command

uint8_t

0x0B

2

Length

uint16_t

0x0008

4

Unlock Sequence

uint32_t

0x00000000

4

Address

uint32_t

0x00000000

Example as viewed on bus: 0x0B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

Get Memory Address Range Example Response

Example response from the device

Field Size

Description

Data Type

Value

1

Command

uint8_t

0x0B

2

Length

uint16_t

0x0008

4

Unlock Sequence

uint32_t

0x00000000

4

Address

uint32_t

0x00000000

1

Status

uint8_t

0x01

4

Program Flash Start

uint32_t

0x00002000

4Program Flash Enduint32_t0x000AB7FE

Example as viewed on bus: 0x0B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0xFE, 0xB7, 0x0A, 0x00