19 set address/length for flash access – ADLINK CoreExpress-ECO2 User Manual

Page 26

Advertising
background image

4.19 Set Address/Length for Flash Access

This command prepares the read or write access to the SMC-Flash. For this, the address and the
length information must be set in the first step. In the next step the Data can be read or write to the

Flash. The address must have a 16-bit format and a length information about the number of bytes to
write. For accesses to the USER-Area be sure that the address have 32-bit alignment and is within

1kB (or 512Bytes), so 0x0000, 0x0004, 0x0008, …, 0x03f8, 0x03fc are valid addresses. To access
the SECURE-Area the address must be 0x8000 or greater but not higher than 0x807c. The memory

map is show in Table 4.14.1.

The number of bytes to write must be a multiple of 4 and not more than 32 Bytes.

No Memory

0xFFFF

0x8080

SECURE-Data

0x807F

0x8000

No Memory

0x7FFF

0x0400

USER-Data

0x03FF

0x0000

Table 4.19.1 Memory-Map of SMC-Flash with 1024 Bytes User-Data

START

SMC_addr ACK command ACK

length ACK MSB_Addr

ACK LSB_Addr ACK

Data_length ACK

STOP

Table 4.19.2 SMC receiver format of the Set Address/Length for Flash Access Command Code

ITEM

DESCRIPTION

START

SM-bus start condition

SMC_addr

0x50 (8-bit)

ACK

SM-bus acknowledge condition generated by receiver

command

0x40 = “Set Address/Length for Flash Access” Command code

length

0x03 = 3 Bytes data length

MSB_byte

High-byte of Flash-Address

LSB_byte

Low-byte of Flash-Address (32bit-alignment)

Data_length

Number of Data-Bytes to read or write (in steps of 4)

STOP

SM-bus stop condition

Table 4.19.3 Explanation of Table 4.19.2

Advertising