In detail,
On each STM32 chip has two pins BOOT0 and BOOT1, these two pins in the chip reset the level state determines the chip after the reset from which area starts to hold
Line procedure, see the following table:
Boot1=x boot0=0 boot from the user flash, which is the normal mode of operation.
Boot1=0 boot0=1 boot from the system store, this mode starts the program features set by the manufacturer.
The Boot1=1 Boot0=1 is started from the built-in SRAM, which can be used for debugging.
STM32 three boot modes correspond to storage media that are built into the chip, which are:
1 user Flash memory = chip built in Flash.
2 SRAM = chip built-in Ram area, is memory.
3 system memory = chip inside a specific area, the chip factory in this area preset a section of bootloader, is usually said ISP program. This area
No one can modify or erase the contents of the domain after the chip is manufactured, that is, it is a ROM area.
It should be noted that generally do not use the built-in SRAM startup (Boot1=1 Boot0=1), because the SRAM lost power after the data loss. In most cases, SRAM is only used when debugging, and it can do other uses. If the local fault diagnosis, write a small program loaded into the SRAM on the diagnostic board of other circuits, or use this method to read and write on board the Flash or EEPROM. You can also use this method to remove the internal flash read and write protection, of course, the release of read and write protection while Flash content is automatically cleared to prevent malicious software copy.
General BOOT0 and BOOT1 jumpers are jumped to 0 (ground). Only in the case of ISP download, boot0=1,boot1=0, download completed, the BOOT0 jumper back to 0, also known as boot0=0,boot1=0.
Online system Programming ISP
ISP (In-system programming) online system programmable, means that the blank device on the circuit board can be programmed to write to the end-user code, without the need to remove the device from the circuit board, the device has been programmed can also be erased or reprogrammed by the ISP. ISP technology is the future development direction.
How the ISP works
ISP implementation is relatively simple, general practice is the internal memory can be the host computer software through the serial port to rewrite. In the case of SCM, the data from the host computer can be received and written to the memory via SPI or other serial interface. So even if we will chip welding on the circuit board, as long as set aside and host computer interface of this serial port, you can achieve the chip internal memory rewrite, and no need to remove the chip.