User manual
In-circuit debugging UM0036
224/385 Doc ID 7705 Rev 11
When you enter a debugging session, the SWIM entry sequence activates the
communication channel on a single pin. You can then:
● control execution of your application through the debug module (step, break, abort)
● set software breakpoints by using a dedicated instruction
● use the advanced breakpoints offered by the debug module
In-circuit debugging with SWIM offers the following advantages:
● Non-intrusive access to the CPU bus: no dedicated interrupt vector, no software
monitor, read/write access on-the-fly to RAM and peripheral registers, and to the Flash
memory when the application is stopped.
● Possibility to freeze peripherals when the application is stopped (depending on your
MCU, refer to datasheet).
● Possibility of starting a debug session in hot plug mode (without resetting the
microcontroller).
7.1 Connecting to and configuring the microcontroller
To connect to your MCU for ICD, you must:
1. Make sure that you have the correct hardware configuration.
2. Correctly identify your MCU in the ICD MCU configuration window in STVD.
3. Choose to establish the connection with the MCU while ignoring the current option byte
values, or to take them into account.
7.1.1 Connecting the hardware for in-circuit debugging
Hardware connection for ICC protocol
For STVD to connect to the ST7 microcontroller on your application board, you must install
an ICC connector on your application board, which relays the necessary signals to your
microcontroller. You must then connect the ICC cable between your application board and
one of the following devices:
● The ICC add-on of an ST Micro Connect box (ST7-EMU3 emulator)
● The ICC connector of an ST7-DVP3 emulator
● A Raisonance RLink in-circuit debugger/programmer
For more information about setting up this hardware connection, refer to your hardware user
manual:
● ST7-EMU3 Emulator User Manual (for ST Micro Connect with ICC add-on)
●
ST7-DVP3 Emulator User Manual
Hardware connection for SWIM protocol
For STVD to connect to the STM8 microcontroller on your application board, you must install
a SWIM cable which relays the signals between your microcontroller on your application
board and your hardware (STice box, STLink or RLink).
The SWIM cable is connected at one end to your application board through an ERNI
connector, and at the other end, to the STice box via the SWIM connector board, or directly
to the STLink or RLink.