4.3.4.2Block Read command
The Block Read command reads a block of data from an
number of bytes = number of blocks * block size * word size
The block read command consists of nine command bytes. The return value is any number of data bytes followed by a single status byte indicating the success of the command.
Command Syntax:
0x50 md as ws ad ai nh nl bs
Return:
d1 d0 ... SC
where
md = module (0 = invalid, 1 =
ws = word size (2 =
ai = address increment (number to increment address by after each write) nh = number of blocks to read (upper 4 bits)
nl = number of blocks to read (lower 8 bits)
bs = block size in words (i.e., number of words per block)
d1 = data (MSB)
d0 = data (LSB)
…= the number of data bytes = ws × bs × number of blocks (nh:nl) SC = Status Code
Example (values shown hex):
To read three data values from a
Command: | cd | md | as | ws | ad | ai | nh | nl | bs |
Send: | 50 | 02 | 00 | 02 | 06 | 00 | 00 | 03 | 02 |
Receive: | da1 db1 dc1 | dd1 da2 db2 dc2 | dd2 da3 db3 dc3 dd3 00 (if successful) |
where
dax = MSB of register 6 dbx = LSB of register 6 dcx = MSB of register 8 ddx = LSB of register 8
Note: x = 1 is first read, x = 2 is second read, x = 3 is third read
22