Bootloader command set
AN3154
Doc ID 17063 Rev 1
3.6
Read Memory command
The Read Memory command is used to read data from any valid memory address (see
note) in RAM, Flash memory and in the information block (System memory or option byte
areas).
Note:
Refer to
Section 3.1: Device-dependent bootloader parameters
for more details about the
valid memory addresses for the device you are using.
When the bootloader receives the Read Memory command, it starts to verify the contents of
the message:
●
ID of the command is correct or not
●
ReadOutProtection is disabled or enabled
●
Address to be read is valid or not
If the message content is correct it transmits an ACK message otherwise it transmits a
NACK message.
After sending an ACK message, then it transmits the required data to the application ((N +
1) bytes) via (N+1) messages /8 (since each message contains 8 bytes), starting from the
received address.
Figure 12.
Read memory command: host side
The host sends messages as follows:
Command message:
Std ID = 0x11, DLC = 0x05, data[0] = 0xXX: MSB of the address... data[3] = 0xYY: LSB of
the address, data[4] = N: number of bytes to be read (where 0 < N
255).
3TART2EADMEMORY
%NDOF2EADMEMORY
3ENDREADMESSAGESTD)$X
2ECEIVE. MESSAGESFROMBOOTLOADER
7AITFOR!#+OR.!#+
3END.!#+MESSAGE
AI
!#+
.!#+