EasyManuals Logo
Home>ST>Control Unit>STM8

ST STM8 User Manual

ST STM8
39 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #14 background imageLoading...
Page #14 background image
Single wire interface module (SWIM) UM0470
14/39 DocID14024 Rev 4
3.5 SWIM commands
The host can send a command when the line is idle or after each data byte from the 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 canceled and the new command is
decoded, except in the case of WOTF.
Three commands are available. They are listed in Table 1.
3.5.1 SRST: system reset
Format: 1 command from host to target
Parameters:
None.
The SRST command generates a system reset only if the SWIM_CSR/SWIM_DM bit is set.
3.5.2 ROTF: read on-the-fly
Format: 1 command followed by the number of bytes to be read followed by the address on
three bytes.
Parameters:
N The 8 bits are the number of bytes to read (from 1 to 255)
@E/H/L: This is the 24-bit address to be accessed.
D[...]: 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 the SWIM_DM bit is cleared, the ROTF can only be done on the SWIM internal registers.
Table 1. SWIM command summary
Command Binary code
SRST 000
ROTF 001
WOTF 010
Reserved for future use
011
1xx
SRST
ROTF N @E @H @L D[@] D[@+N]

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM8 and is the answer not in the manual?

ST STM8 Specifications

General IconGeneral
BrandST
ModelSTM8
CategoryControl Unit
LanguageEnglish

Related product manuals