
AN2662
Bootloader description
Doc ID 14156 Rev 1
9/83
The system clock is derived from the embedded internal high-speed RC for USARTx
bootloader. This internal clock is used also for DFU and CAN bootloaders but only for the
selection phase. An external clock (8 MHz, 14.7456 MHz or 25 MHz.) is required for DFU
and CAN bootloader execution after the selection phase.
The clock security system (CSS) interrupt is enabled for CAN and DFU bootloaders. Any
failure (or removal) of the external clock will generate system reset.
In the Bootloader firmware, the Independent Watchdog (IWDG) prescaler is configured to its
maximum value and is periodically refreshed to prevent watchdog reset (in case when the
hardware IWDG option was previously enabled by the user).
After downloading the application binary, if the user chooses to execute the GO command
and in his application the IWDG is being used, the IWDG prescaler value has to be adapted
to meet the requirements of the application (since the prescaler was set to its maximum
value by the Bootloader).
1.3 Hardware
requirements
The hardware required to put the STM32F105xx and STM32F107xx into System memory
boot mode consists of any circuitry, switch or jumper, capable of holding the BOOT0 pin high
and the BOOT1 pin low during reset.
To connect to the STM32F105xx and STM32F107xx during System memory boot mode,
user use:
– An RS232 serial interface (example, ST3232 RS232 transceiver) has to be directly
connected to the USART1_RX (PA10) and USART1_TX (PA9) pins when USART1 is
used or connected to the USART2_RX (PD6) and USART2_TX (PD5) pins when
USART2 is used.
– A CAN interface (CAN transceiver) has to be directly connected to the CAN2_RX
(PB5) and CAN2_TX (PB6) pins
– A certified USB cable has to be connected to the microcontroller through a USB
Micro-AB receptacle and optionally an ESD protection circuitry.
The USART1_CK, USART1_CTS and USART1_RTS pins are not used, therefore the
application can use these pins for other peripherals or GPIOs. The same note is applicable
for USART2.
Once the USB Device is enabled, all its related pins are dedicated to USB communication
only, and cannot be used for other application purposes.
The user can control the BOOT0 and Reset pins from a PC serial applet using the RS232
serial interface which controls BOOT0 through the CTS line and Reset through the DCD
line. The user must use a full null modem cable. The necessary hardware to implement for
this control exists in the STM3210C-EVAL board. For more details about this, refer to
document: “STM3210C-EVAL board user manual”, available from the STMicroelectronics
website: www.st.com.
1.4 Bootloader
selection
The STM32F105xx and STM32F107xx embedded bootloader supports four peripherals
interfaces: USART1, USART2, CAN2 and DFU (USB). Any one of these peripheral