DataSheet.es    


PDF UM0470 Data sheet ( Hoja de datos )

Número de pieza UM0470
Descripción STM8 SWIM communication protocol and debug module
Fabricantes STMicroelectronics 
Logotipo STMicroelectronics Logotipo



Hay una vista previa y un enlace de descarga de UM0470 (archivo pdf) en la parte inferior de esta página.


Total 30 Páginas

No Preview Available ! UM0470 Hoja de datos, Descripción, Manual

www.DataSheet4U.com
UM0470
User manual
STM8 SWIM communication protocol and debug module
Introduction
This manual has been written for developers who need to build programming, testing or
debugging tools for the STM8 microcontroller family. It explains the debug architecture of the
STM8 core.
The STM8 debug system consists of 2 modules.
DM -
Debug module
SWIM -
Single wire interface module
Related documentation
STM8 Flash programming reference manual (PM0047)
January 2008
Rev 1
1/37
www.st.com

1 page




UM0470 pdf
www.DataSUhMee0t44U7.c0om
2
Communication layer
Communication layer
The SWIM module is a single wire interface based on asynchronous, high sink (8 mA),
open-drain, bidirectional communication.
While the CPU is running, the SWIM module allows non-intrusive read/write accesses to be
performed on-the-fly to the RAM and peripheral registers, for debug purposes.
In addition, while the CPU is stalled, the SWIM module allows read/write accesses to be
performed to any other part of the MCU’s memory space (Data EEPROM and program
memory).
CPU registers (A, X, Y, CC, SP) can also be accessed. These registers are mapped in
memory and can be accessed in the same way as other memory addresses.
Register, peripherals and memory can be accessed only when the SWIM_DM bit is set.
When the system is in HALT, WFI or readout protection mode, the NO_ACCESS flag in
the SWIM_CSR register is set. In this case, it is forbidden to perform any accesses
because parts of the device may not be clocked and a read access could return
garbage or a write access might not succeed.
The SWIM module can perform a MCU device software reset.
The SWIM pin can also be used by the MCU target application as a standard I/O port with
some restrictions if you also want to use it for debug. The safest way is to provide a strap
option on the application PCB.
Figure 2. SWIM pin external connections
Application I/O
SWIM interface for tools
STM8
SWIM pin
Jumper selection for
debug purposes
5/37

5 Page





UM0470 arduino
www.DataSUhMee0t44U7.c0om
Single wire interface module (SWIM)
3.5 SWIM commands
The Host can send a command when the line is idle or after each data byte from device.
After sending the command, the host releases the line. When the SWIM is ready to answer
to the command, it initiates the transfer. If a new command from the host occurs while a
command is pending in SWIM, the pending command is cancelled and the new command is
decoded, except in case of WOTF.
Three commands are available. They are listed in Table 1.
Table 1.
SWIM command summary
Command
SRST
ROTF
WOTF
Reserved for future use
Binary Code
000
001
010
011
1xx
3.5.1
3.5.2
3.5.3
SRST: system reset
Format: 1 command from Host to Target
SRST
Parameters:
None.
SRST command generates a system reset only if SWIM_CSR/SWIM_DM bit is set.
ROTF: read on the fly
Format: 1 command followed by the number of bytes to be read followed by the address on
three bytes.
ROTF
N
@E @H @L
D[@]
D[@+N]
Parameters:
N
@E/H/L:
D[...]:
The 8 bits are the number of bytes to read (from 1 to 255)
This is the 24-bit address to be accessed.
These are the data bytes read from the memory space
If the host sends a NACK to a data byte, the device will send the same byte again.
If SWIM_DM bit is cleared, ROTF can only be done on SWIM internal registers.
WOTF: write on the fly
1 command followed by the number of bytes to be written followed by the address on three
bytes.
WOTF
N
@E @H @L D[@] D[@+N]
11/37

11 Page







PáginasTotal 30 Páginas
PDF Descargar[ Datasheet UM0470.PDF ]




Hoja de datos destacado

Número de piezaDescripciónFabricantes
UM0470STM8 SWIM communication protocol and debug moduleSTMicroelectronics
STMicroelectronics

Número de piezaDescripciónFabricantes
SLA6805M

High Voltage 3 phase Motor Driver IC.

Sanken
Sanken
SDC1742

12- and 14-Bit Hybrid Synchro / Resolver-to-Digital Converters.

Analog Devices
Analog Devices


DataSheet.es es una pagina web que funciona como un repositorio de manuales o hoja de datos de muchos de los productos más populares,
permitiéndote verlos en linea o descargarlos en PDF.


DataSheet.es    |   2020   |  Privacy Policy  |  Contacto  |  Buscar