Write Protect Command; Figure 17. Write Protect Command: Host Side - ST STM32F105 Series Application Note

System memory boot mode
Hide thumbs Also See for STM32F105 Series:
Table of Contents

Advertisement

USART bootloader
2.13

Write Protect command

The Write Protect command is used to enable the write protection for some or all Flash
memory sectors. When the bootloader receives the Write Protect command, it transmits the
ACK byte to the host. After the transmission of the ACK byte, the bootloader waits for the
number of bytes to be received (sectors to be protected) and then receives the Flash
memory sector codes from the user.
At the end of the Write Protect command, the bootloader transmits the ACK byte and
generates a system Reset to take into account the new configuration of the option byte.
Note:
On the STM32F105xx and STM32F107xx , the sector size is 4 Kbytes (2 pages) for the
Write Protect command.
The Write Protect command sequence is as follows:
the bootloader receives one byte that contains N, the number of sectors to be write-
protected – 1 (0 ≤ N ≤ 255)
the bootloader receives (N + 1) bytes, each byte contains a sector code
Note:
The total number of sectors and the sector number to be protected are not checked, this
means that no error is returned when a command is passed with a wrong number of sectors
to be protected or a wrong sector number.
Note:
If a second Write Protect command is executed, the Flash memory sectors that had been
protected by the first command become unprotected and only the sectors passed within the
second Write Protect command become protected.

Figure 17. Write Protect command: host side

1. WP = Write Protect.
32/83
(1)
Start WP
Send 0x63+0x9C
Wait for ACK
or NACK
ACK
Send the number of sectors
to be protected (1 byte)
Send the sector codes
Send checksum
Wait for ACK
or NACK
ACK
(1)
End of WP
Doc ID 14156 Rev 1
NACK
NACK
ai14645b
AN2662

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F105 Series and is the answer not in the manual?

This manual is also suitable for:

Stm32f107 series

Table of Contents

Save PDF