UM0470 User manual. STM8 SWIM communication protocol and debug module. Introduction
|
|
|
- Frederica Cox
- 9 years ago
- Views:
Transcription
1 UM47 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 two modules: DM: Debug module SWIM: Single wire interface module Related documentation: How to program STM8S and STM8A Flash program memory and data EEPROM (PM5) (STM8A version is not published yet) How to program STM8L Flash program memory and data EEPROM (PM54) June 2 Doc ID 424 Rev 3 /37
2 Contents UM47 Contents Debug system overview Communication layer Single wire interface module (SWIM) Operating modes SWIM entry sequence Bit format High speed bit format Low speed bit format SWIM communication protocol SWIM commands SRST: system reset ROTF: read on the fly WOTF: write on the fly SWIM communication reset CPU register access SWIM communication in Halt mode Physical layer STM8 SWIM registers SWIM control status register (SWIM_CSR) SWIM clock control register (CLK_SWIMCCR) Debug module (DM) Introduction Main features Debug Reset Breakpoints Abort Watchdog control Interaction with SWIM Breakpoint decoding table /37 Doc ID 424 Rev 3
3 UM47 Contents 4.5 Software breakpoint mode Timing description Abort Data breakpoint Instruction breakpoint Step mode Application notes Illegal Memory access Forbidden stack access DM break DM registers DM breakpoint register extended byte (DM_BKRE) DM breakpoint register high byte (DM_BKRH) DM breakpoint register low byte (DM_BKRL) DM breakpoint register 2 extended byte (DM_BKR2E) DM breakpoint register 2 high byte (DM_BKR2H) DM breakpoint register 2 low byte (DM_BKR2L) DM control register (DM_CR) DM control register 2 (DM_CR2) DM control/status register (DM_CSR) DM control/status register 2 (DM_CSR2) DM enable function register (DM_ENFCTR) Summary of SWIM, DM and core register maps Appendix A Description of the DM_ENFCTR register for each STM8 product Revision history Doc ID 424 Rev 3 3/37
4 List of tables UM47 List of tables Table. SWIM command summary Table 2. CPU register memory mapping in STM Table 3. SWIM pin characteristics Table 4. Decoding table for breakpoint interrupt generation Table 5. STM8 registers Table 6. Peripherals which are frozen by the bits of the DM_ENFCTR register for each STM8 product Table 7. Document revision history /37 Doc ID 424 Rev 3
5 UM47 List of figures List of figures Figure. Debug system block diagram Figure 2. SWIM pin external connections Figure 3. SWIM activation sequence Figure 4. SWIM activation timing diagram Figure 5. SWIM entry sequence Figure 6. High speed bit format Figure 7. Low speed bit format Figure 8. Command format (Host -> Target) Figure 9. Data format (Target -> Host) Figure. Timings on SWIM pin Figure. Debug module block diagram Figure 2. STM8 Instruction Model Figure 3. STM8 Debug Module Stall Timing Figure 4. STM8 DM Data Break Timing Figure 5. STM8 DM instruction break timing Figure 6. STM8 DM step timing Doc ID 424 Rev 3 5/37
6 Debug system overview UM47 Debug system overview The STM8 debug system interface allows a debugging or programming tool to be connected to the MCU through a single wire bidirectional communication based on open-drain line. It provides non-intrusive read/write access to RAM and peripherals during program execution The block diagram is shown in Figure. Figure. Debug system block diagram STM8 LSI oscillator SWIM pin SWIM Entry Comm Layer SWIM Command Decode Debug module (DM) CPU Bus STM8 Core HSI oscillator Peripheral Bus RAM Bus Peripherals RAM Flash/ Data EEPROM The debug module uses the two internal clock sources present in the device, the LSI Low Speed Internal clock (usually in the range 3 khz-2 khz, depending on the product) one and the HSI High Speed Internal clock (usually in the range MHz to 25 MHz, depending on the device). The clocks are automatically started when necessary. 6/37 Doc ID 424 Rev 3
7 UM47 Communication layer 2 Communication layer The SWIM is a single wire interface based on asynchronous, high sink (8 ma), open-drain, bidirectional communication. While the CPU is running, the SWIM 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 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 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 STM8 Application I/O SWIM interface for tools SWIM pin Jumper selection for debug purposes Doc ID 424 Rev 3 7/37
8 Single wire interface module (SWIM) UM47 3 Single wire interface module (SWIM) 3. Operating modes Note: After a Power-On Reset (powering of the device) the SWIM is reset and enters in its OFF mode.. OFF: In this mode the SWIM pin must not be used as an I/O by the application. It is waiting for the SWIM entry sequence or to be switched to I/O mode by the application software. 2. I/O: This state is entered by the software application by setting the SWIM disable bit (SWD) bit in the core configuration register (CFG_GCR). In this state, the user application can use the SWIM pin as a standard I/O pin, the only drawback is that there is no way to debug the functionality of this pin with the built-in debug capabilities. In case of a reset, the SWIM goes back to OFF mode. 3. ACTIVE: This mode is entered when a specific sequence is detected on the SWIM pin while in OFF state. In this state, the SWIM pin is used by the host tool to control the STM8 with 3 commands. (SRST System Reset, ROTF Read On The Fly, WOTF Write On The Fly) Please note that the SWIM can be set Active and communicate while the device is in RESET state (NRST pin forced low) Figure 3. SWIM activation sequence POR OFF reset N SWD bit set N Y I/O CSR RST bit set Y SWIM entry sequence Y ACTIVE SRST N ROTF WOTF 8/37 Doc ID 424 Rev 3
9 UM47 Single wire interface module (SWIM) 3.2 SWIM entry sequence After a POR, and as long as the SWIM is in OFF mode, the SWIM pin is sampled for entry sequence detection. In order to do this, the internal low speed RC clock is automatically turned ON after POR and remains forced ON as long as the SWIM is in OFF mode. If the register which forces the SWIM in I/O mode is written before the entry sequence is finalized, the SWIM enters I/O mode. Once the SWIM is ACTIVE, writing this bit has no influence on communication and the SWIM interface remains in ACTIVE mode. If an application uses the SWIM pin as standard I/O, it puts the SWIM interface in I/O mode in the initialization section of the software code (typically, this is performed just after the reset). However, even in this case, it is still possible to put the SWIM interface in ACTIVE mode by forcing the RESET pin to and keep it low for the duration of the SWIM entry sequence. As long as the SWIM is in OFF mode, the SWIM entry sequence is detected at any moment, during reset or when the application is running. If both the SWIM pin and the reset pin are multiplexed with I/Os, the way to enter SWIM ACTIVE state is to power down the MCU device, power up and to maintain the reset until the end of the SWIM entry sequence. Figure 4. SWIM activation timing diagram Doc ID 424 Rev 3 9/37
10 Single wire interface module (SWIM) UM47 SWIM activation is shown in Figure 4 and each segment on the diagram is described below.. To make the SWIM active, the SWIM pin must be forced low during a period of 6 µs (which is 64 pulses minimum at the frequency of HSI). 2. After this first pulse at, the SWIM detects a specific sequence to guarantee robustness in the SWIM active state entry. The SWIM entry sequence is: 4 pulses at khz followed by 4 pulses at 2 khz. The frequency ratio is detected and allows SWIM entry. The ratio can be easily detected whatever the internal RC frequency. The waveform of the entry sequence is shown in Figure 5. Note that the sequence starts and ends with the SWIM pin at. 3. After the entry sequence, the SWIM enters in SWIM active state, and the HSI oscillator is automatically turned ON. 4. After this delay, the SWIM sends a synchronization frame to the host. Synchronization frame description: A synchronization frame of 28 x HSI clock periods with the SWIM line at is sent out by the MCU device to allow for the measurement of the RC by the debug host. An advanced debug host can re-calibrate its clock to adapt to the frequency of Internal RC. 5. Before starting a SWIM communication, the SWIM line must be released at to guarantee that the SWIM is ready for communication (at least 3 ns). 6. Write Ah in the SWIM_CSR: - setting bit 5 allows the whole memory range and SRST command to be accessed. - setting bit 7 masks the internal reset sources 7. Release reset which starts the option byte loading sequence. Wait ms for stabilization. 8. Once option byte loading has occurred and stabilization time is reached, the CPU is in phase 8: - STM8S is stalled and HSI = 6 Mhz (see STM8S datasheets for % accuracy) - SWIM clock is at HSI/2 = 8 Mhz - SWIM is active in low speed bit format (see Section 3.3.2) Figure 5. SWIM entry sequence SWIM Active SWIM pin ms 5 µs SWIM entry sequence /37 Doc ID 424 Rev 3
11 UM47 Single wire interface module (SWIM) 3.3 Bit format The bit format is a Return-To-Zero format, which allows synchronization of every bit. Two communication speeds are available. At SWIM activation, the low speed is selected. The high speed is selected by setting the HS bit in the SWIM_CSR register with the SWIM protocol. When entering SWIM mode during the RESET phase, it is possible that the option bytes have not yet been loaded from non volatile memory to their respective registers. Option byte loading is triggered by any internal or external reset. In order to ensure proper system behavior, the HS bit should not be set until the option byte loading is finished. At the end of the option byte loading, the HSIT bit in the SWIM_CSR is set by hardware High speed bit format bit is generated with ten HSI oscillator pulses. The bit format is: - 2 pulses at followed by 8 pulses at for value. - 8 pulses at followed by 2 pulses at for value. When the SWIM receives a data packet, it will decode: - when the number of consecutive samples at is less or equal to 4. - when the number of consecutive samples at is greater or equal to 5. Figure 6. High speed bit format <=> <=> Doc ID 424 Rev 3 /37
12 Single wire interface module (SWIM) UM Low speed bit format bit is generated with twenty-two HSI oscillator pulses. The bit format is: - 2 pulses at followed by 2 pulses at for value. - 2 pulses at followed by 2 pulses at for value. When the SWIM receives a data packet, it will decode: - when the number of consecutive samples at is less or equal to 8. - when the number of consecutive samples at is greater or equal to 9. Figure 7. Low speed bit format <=> <=> 2/37 Doc ID 424 Rev 3
13 UM47 Single wire interface module (SWIM) 3.4 SWIM communication protocol When in ACTIVE mode, communication can be initiated by host or device. Each byte or command is preceded by a -bit header in order to arbitrate if both host and device initiate the communication at the same time. The host header is in order to have the priority over the device in case of arbitration, due to open-drain capability. The host can start the transfer only if there is no transfer on-going. Figure 8. Command format (Host -> Target) Command Data b2 b b pb ack Italic: Bit sent by the Host Bold: Bit sent by the device b7 b6 b5 b4 b3 b2 b b pb ack Each command sent by the host is made of: command (ROTF, WOTF or SWRST) made of Header: bit at b2-b: 3-bit command pb: parity bit: XOR between all b(i) ack:acknowledge ( bit at ). The receiver must send the not-acknowledge value if it has detected a parity error (NACK: not acknowledge = bit at ), or it is not yet ready. optionally several data packets (in case of WOTF) made of: Header: bit at b7-b: 8-bit data pb: parity bit sent after data. XOR between all b(i) ack: acknowledge Figure 9. Data format (Target -> Host) data n- data n data n b7 b6 b5 b4 b3 b2 b b pb ack Italic: Bit sent by the Host Bold: Bit sent by the device Each data frame is made of: Header: bit at b7-b: 8-bit data pb: parity bit sent after data ack: acknowledge Doc ID 424 Rev 3 3/37
14 Single wire interface module (SWIM) UM 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. Table. SWIM command summary Command Binary Code SRST ROTF WOTF Reserved for future use xx 3.5. SRST: system reset Format: 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: command followed by the number of bytes to be read followed by the address on three bytes. @L D[@] D[@+N] Parameters: N The 8 bits are the number of bytes to read (from to 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 SWIM_DM bit is cleared, ROTF can only be done on SWIM internal registers. 4/37 Doc ID 424 Rev 3
15 UM47 Single wire interface module (SWIM) WOTF: write on the fly command followed by the number of bytes to be written followed by the address on three bytes. @L D[@] D[@+N] Parameters: N The 8 bits are the number of bytes to write (from to This is the 24-bit address to be accessed. D[...]: These are the data bytes to write in the memory space If a byte D [i] has not been written when the following byte D [i+] arrives, D [i+] will be followed by a NACK. In this case the Host must send D [i+] again until it is acknowledged. For the last byte, if it is not yet written when a new command occurs, the new command will receive a NACK and will not be taken into account. If SWIM_DM bit is cleared, WOTF can only be done on SWIM internal registers. 3.6 SWIM communication reset In case of a problem during communication, the host can reset the communication and the on-going command by sending 28 x HSI clock periods low on the SWIM pin. If the SWIM logic detects that the SWIM pin is low for more than 64 x HSI clock periods, it will reset the communication state machine and will switch the SWIM to low-speed mode (SWIM_CSR.HS <- ). This is to allow for variation in the frequency of the internal RC oscillator. In response to this communication reset, SWIM will send the synchronization frame which is 28x HSI oscillator periods low on DBG pin. Doc ID 424 Rev 3 5/37
16 Single wire interface module (SWIM) UM CPU register access The CPU registers are mapped in the STM8 memory, and they can be read or written directly using the ROTF and WOTF SWIM commands. Write operations to the CPU registers are committed only when the CPU is stalled. To flush the instruction decode phase, you must set the FLUSH bit in the DM control/status register 2 (DM_CSR2) after writing a new value in the Program Counter (PCE, PCH, PCL). Table 2. CPU register memory mapping in STM8 CPU register A PCE PCH PCL XH XL YH YL SPH SPL CC Memory location 7Fh 7Fh 7F2h 7F3h 7F4h 7F5h 7F6h 7F7h 7F8h 7F9h 7FAh 3.8 SWIM communication in Halt mode To maintain the communication link with the debug host, the HSI oscillator remains on when the MCU enters Halt mode. This means that halt mode power consumption measurements have no meaning when the SWIM is active. The NO_ACCESS bit in the SWIM_CSR register is set when the system is in HALT, WFI or readout protection mode. This means the bus is not accessible in this case. The OSCOFF bit in the SWIM_CSR register is used to switch off the oscillator. In this case, debug control is lost as long as the device is in Halt mode and the SWIM pin is high. The only way to recover the debug control is to induce a falling edge on SWIM pin: this will reenable the HSI oscillator. 6/37 Doc ID 424 Rev 3
17 UM47 Single wire interface module (SWIM) 3.9 Physical layer During the communication, the SWIM pin will be in pseudo-open drain configuration. The SWIM pin in the device is capable of sinking 8 ma when it drives the line to. The external pull-up on the SWIM line should be sized in such a way that the maximum rise time t r of the SWIM line should be less than sampling period of the bit (which is ns +/- 4 %). Figure. Timings on SWIM pin t r t ib SWIM pin t f t b /t b Table 3. SWIM pin characteristics Parameter Symbol Generic formula Timings for HSI = MHz LSI = 32 to 64 khz Min Max Fall time on SWIM pin t f TBD 5 ns Rise time on SWIM pin t r TBD 96 ns Inter-bit time (The time which SWIM pin stays high between 2 bits) Inter-frame time (Time between end of a frame and the next one) Low time for a bit at Low time for a bit at (High Speed) Injected current on SWIM pin t ib TBD > t if TBD High speed: t b TBD 768 ns 832 ns Low speed: t b TBD.6 µs 2.4 µs High speed: Tb TBD 92 ns 28 ns Low speed: Tb TBD 5 ns 25 ns TBD 8 ma Doc ID 424 Rev 3 7/37
18 Single wire interface module (SWIM) UM47 3. STM8 SWIM registers 3.. SWIM control status register (SWIM_CSR) Address: 7F8h Reset value: h This register is reset only by a power on reset or by SWIM SRST command if the RST bit = in the SWIM_CSR register SAFE_MASK NO_ACCESS SWIM_DM HS OSCOFF RST HSIT PRI rw r rw rw rw rw r rw Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 SAFE_MASK: Mask internal RESET sources This bit can be read or written through SWIM only. It cannot be accessed through the STM8 bus. It includes the Watchdog reset. : Internal Reset sources are not masked : Internal reset sources are masked NO_ACCESS: Bus not accessible This bit can be read through SWIM only, to determine the bus is accessible or not. It is set automatically if the device is in HALT, WFI or readout protection mode. : Bus is accessible : Bus is not accessible Caution: Depending on the SWIM revision, in some devices, the NO_ACCESS bit indicates only that the device is in HALT mode. SWIM_DM: SWIM for Debug Module This bit can be read or written to through SWIM only. It cannot be accessed through the STM8 bus. : The SWIM can access only SWIM_CSR register. SWIM reset command has no effect : The whole memory range can be accessed with ROTF and WOTF commands. The SRST command generates a Reset HS: High Speed This bit can be read or written through SWIM only. It cannot be accessed through STM8 bus. : Low speed bit format : High speed bit format The speed change occurs when the communication is IDLE. It is reset by the SWIM communication reset condition as described in Section 3.6. OSCOFF: Oscillators Off control bit This bit can be read or written through SWIM only. It cannot be accessed through STM8 bus. : HSI oscillator remains ON in halt mode : HSI oscillator is not requested ON in Halt mode 8/37 Doc ID 424 Rev 3
19 UM47 Single wire interface module (SWIM) Bit 2 Bit Bit RST: SWIM Reset Control Bit This bit can be read or written through SWIM only. It cannot be accessed through STM8 bus. : SWIM is not reset when a SRST command occurs. : SWIM is reset when a SRST command occurs. SWIM will re-enter OFF mode. HSIT: High Speed Internal Clock is trimmed This bit is read only through SWIM only. It cannot be accessed through STM8 bus. It is set when the HSIT bit is set in the core configuration register and reset by an external reset. : High Speed Internal Clock is not trimmed, SWIM must remain in low speed mode. : High Speed Internal Clock is trimmed, SWIM high speed mode is allowed. PRI: SWIM access priority This bit can be read or written through SWIM only. Usually the SWIM accesses to system resources are non-intrusive, SWIM having the lowest priority. This can be overridden by setting this bit. : Non-intrusive access by SWIM to system resources (low priority) : Intrusive access by SWIM to system resources (SWIM has priority, CPU is stalled). Note: The SWD bit is located in the STM8 core configuration register. Refer to the corresponding datasheet for information on this register 3..2 SWIM clock control register (CLK_SWIMCCR) Address Offset: 5CDh (product dependent) Reset value: xxxx (xh) Reserved SWIMCLK rw Bits 7: Bit Reserved, must be kept cleared. SWIMCLK SWIM clock divider This bit is set and cleared by software. : SWIM clock divided by 2 : SWIM clock not divided by 2 Note: this register is not present in some STM8 devices. Doc ID 424 Rev 3 9/37
20 Debug module (DM) UM47 4 Debug module (DM) 4. Introduction The Debug Module (DM) allows the developer to perform certain debugging tasks without using an emulator. For example, the DM can interrupt the MCU to break infinite loops or output the core context (stack) at a given point. The DM is mainly used for in-circuit debugging. 4.2 Main features Two conditional breakpoints (break on instruction fetch, data read or write, stack access...) Software breakpoint control Step mode External Stall capability on WOTF command in SWIM mode Watchdog and peripherals control DM Version identification capability Interrupt Vector Table selection 2/37 Doc ID 424 Rev 3
21 . UM47 Debug module (DM) Figure. Debug module block diagram WATCHDOG SWIM SWIM STM8 CPU EMU/DMA interface SOFTWARE BREAK RESET DM STALL/TRAP Debug Module (DM) DM REGISTERS READ/WRITE LOGIC SWBKE enable bit SWTRF flag SWBKF flag STE STF STALL bit SWTRAP bit DM_BK DM_BK2 DM BREAKPOINT LOGIC WATCHDOG CONTROL LOGIC DM_CSR RST BRW BK2F BKF EXT STALL MANAGEMENT - - BC2 BC BC BIR BIW - DM_CR FV_ROM FV_RAM DM_CR2 DM STALL (From Slave DM when available) EXT STALL PERIPHERALS (Timers, USB,...) ENFCTx DM_ENFCT Doc ID 424 Rev 3 2/37
22 Debug module (DM) UM Debug 4.3. Reset The DM registers can be read and written only through the SWIM interface. STM8 core has no access to these registers. Once the SWIM is active and SWIM_DM bit is set in SWIM_CSR register, a data read breakpoint at the reset vector address is automatically set, due to the reset values of the debug module registers. This breakpoint can be used to initialize the debug session Breakpoints Abort The DM generates a stall to the core when a breakpoint is reached. When the processor is stalled, the host can read or modify any address in memory. Access to the processor registers is explained in Section 3.7: CPU register access. To restart the program execution, the STALL bit in DM_CSR2 must be cleared using the WOTF command of the SWIM protocol. To use the Abort function, the host must write the STALL bit in the DM_CSR2 using the SWIM WOTF command. No interrupt is generated. The core is stalled in the current state. Using the SWIM commands, the host can read and modify the status of the MCU. If the CPU registers must be modified, the procedure described in Section 3.7: CPU register access has to be used. The host can restart the program execution by resetting the STALL bit using the SWIM commands Watchdog control Using the WDGOFF bit in the DM control register (DM_CR) you can configure the Window Watchdog and Independent Watchdog counters to be stopped while the CPU is stalled by the Debug Module. This bit must be set before the watchdogs are activated. If a watchdog is enabled by Hardware Watchdog option bit, the WDGOFF bit has no effect on it Interaction with SWIM The SWIM sends the status bit which indicates the SWIM is active or not. When SWIM is not active, the DM will not generate any break/stall request to the CPU. 22/37 Doc ID 424 Rev 3
23 UM47 Debug module (DM) 4.4 Breakpoint decoding table Table 4. Decoding table for breakpoint interrupt generation DM_CR DM_CSR BREAK CONDITIONS BC2 BC BC BIR BIW BKF BK2F BRW Disabled (RESET state) x Data Write and Data=BK2L Data Read and Data=BK2L Data R/W and Data=BK2L / Instruction fetch BK<=@<=BK2 x Data Write on BK<=@<=BK2 Data Read on BK<=@<=BK2 Data R/W on BK<=@<=BK2 / Instruction fetch BK or BK2<=@ x Data Write BK or BK2<=@ Data Read BK or BK2<=@ Data R/W BK or BK2<=@ / X X Disabled x Instruction fetch then x Data Write or or Data Read or or Data R/W or or / Instruction fetch or or x Instruction fetch / Data Write or x- Instruction fetch / Data Read or x- Instruction fetch / Data R/W or x-/ X X Disabled x Data Write in Stack / Instruction fetch or -x Data Write in Stack / Data Write or or Data Write in Stack / Data Read or - Data Write in Stack / Data R/W or or -/ Doc ID 424 Rev 3 23/37
24 Debug module (DM) UM Software breakpoint mode Software breakpoint mode is reserved for debugging tools to insert breakpoints into user code by substituting a user instruction with a software break (reserved BKPT instruction #8b). Software breakpoint mode is enabled using the SWBKPE bit in the DM control/status register 2 (DM_CSR2). When a BKPT instruction is decoded, the CPU is stalled and the STALL and SWBKF bits are set by hardware to indicate that a software breakpoint has occurred. To resume execution, the debugger must restore the user's instruction, then set the FLUSH bit and clear the STALL bit. 4.6 Timing description This paragraph defines when the Debug Module stalls the CPU when using the different breakpoint sources. The STM8 instruction can be modelized in time with an op-code/operand FETCH phase DECODE and EXECUTION phases as shown in Figure 2. The timing information is based on this models. Figure 2. STM8 Instruction Model t FETCH OP-CODE/operand INSTRUCTION DECODE EXECUTE -5 bytes (-2 t CPU ) (to5t CPU ) ( to t CPU ) 4.7 Abort The stall is generated immediately on writing the STALL bit in the DM_CSR2 register. Figure 3. STM8 Debug Module Stall Timing INSTRUCTION t INSTRUCTION 2 INSTRUCTION 3 STALL REQUEST DM Stall generated 24/37 Doc ID 424 Rev 3
25 UM47 Debug module (DM) 4.8 Data breakpoint A stall is generated when SWIM is active, after the end of the current instruction execution. Figure 4. STM8 DM Data Break Timing Fetch2 Dec2.n D_rd Exe2. D_wr...Exe3(stalled)... t DATA BREAK REQUEST Stall generated 4.9 Instruction breakpoint Note: In the STM8, on an instruction break, DM stalls the CPU before the selected instruction execution (while the instruction is in the decode stage). See Figure 5. When the specified address does not correspond to a valid instruction address, no stall is generated. Figure 5. STM8 DM instruction break timing DEC EXE DEC2... EXEC2 (stalled) t INSTRUCTION BREAK REQUEST /STALL Request = DM servicing 4. Step mode The STM8 CPU stall is activated before the instruction execution, in the first decode cycle of the instruction. See Figure 6. Figure 6. STM8 DM step timing t DEC EXEC DEC3 DEC4 DEC2 DEC2 DEC2 DEC2 EXEC2 EXEC2 EXEC2 EXEC2 EXEC3 EXEC4 STEP ENABLE st DM 2nd DM 3rd DM 4th DM Break break break break served/ served/ served served/ CPU Stalled CPU Stalled CPU Stalled CPU Stalled Note: When Step mode and Instruction Break on the next instruction mode are both enabled, both the STF and the BKxF flags are set. When you clear the STALL bit, the step function continues its normal operation. Doc ID 424 Rev 3 25/37
26 Debug module (DM) UM47 4. Application notes 4.. Illegal Memory access To verify if the program attempts to write or read in an illegal part of memory (reserved area), select the Data R/W on condition, where BK and BK2 are the lower and upper addresses of the reserved memory Forbidden stack access If part of the stack contains specific data or instructions that should not be overwritten, the DM can be used to prevent access to these locations. Select one of the Data Write in Stack conditions and set BK to the upper value where the specific data are located in the stack. If the STM8 tries to overwrite these values (after an interrupt or a CALL...), DM will generate a break. The four possible associated conditions allow to manage another breakpoint capability at the same time DM break After an DM break, the CPU is stalled (through the EMU_Stall signal). While the CPU is stalled, the SWIM can read/write any memory location or memory mapped register. The program can be continued from the breakpoint, by resetting the Stall bit. If a change of PC is needed, the SWIM must write the new PC value using the method described in Section 3.7: CPU register access. In order to fetch the code from the new PC address, the SWIM must set the FLUSH bit in the DM control/status register 2 (DM_CSR2) before resetting the STALL bit. 26/37 Doc ID 424 Rev 3
27 UM47 Debug module (DM) 4.2 DM registers These registers are read/write only through the SWIM interface. In this section, the following abbreviations are used: read/write (rw) SWIM can read and write to these bits via the ROTF/WOTF commands. read-only (r) SWIM can only read these bits via the ROTF command DM breakpoint register extended byte (DM_BKRE) STM8 Address: 7F9h Reset value: (FFh) BK[23:6] rw rw rw rw rw rw rw rw Bits 7: BK[23:6]: Breakpoint extended byte value This register is written by software to define the extended 8 address bits of Breakpoint DM breakpoint register high byte (DM_BKRH) Address: 7F9h Reset value: (FFh) BK[5:8] rw rw rw rw rw rw rw rw Bits 7: BK[5:8]: Breakpoint high byte value This register is written by software to define the higher 8 address bits of Breakpoint DM breakpoint register low byte (DM_BKRL) Address: 7F92h Reset value: (FFh) BK[7:] rw rw rw rw rw rw rw rw Bits 7: BK[7:]: Breakpoint high byte value This register is written by software to define the lower 8 address bits of Breakpoint. Doc ID 424 Rev 3 27/37
28 Debug module (DM) UM DM breakpoint register 2 extended byte (DM_BKR2E) Address: 7F93h Reset value: (FFh) BK2[23:6] rw rw rw rw rw rw rw rw Bits 7: BK2[23:6]: Breakpoint 2 extended byte value This register is written by software to define the extended 8 address bits of Breakpoint DM breakpoint register 2 high byte (DM_BKR2H) Address: 7F94h Reset value: (FFh) BK2[5:8] rw rw rw rw rw rw rw rw Bits 7: BK2[5:8]: Breakpoint 2 high byte value This register is written by software to define the higher 8 address bits of Breakpoint DM breakpoint register 2 low byte (DM_BKR2L) Address: 7F95h Reset value: (FFh) BK2[7:] rw rw rw rw rw rw rw rw Bits 7: BK2[7:]: Breakpoint 2 high byte value This register is written by software to define the lower 8 address bits of Breakpoint 2. 28/37 Doc ID 424 Rev 3
29 UM47 Debug module (DM) DM control register (DM_CR) Address: 7F96h Reset value: (h) WDGOFF Reserved BC[2:] BIR BIW Reserved rw - rw rw rw rw rw Bit 7 Bit 6 Bits 5:3 Bit 2 Bit Bit WDGOFF Watchdog control enable. This bit must be set or cleared by software before the watchdogs (WWDG and/or IWDG) are activated. This bit has no effect if the hardware watchdog option is selected. : Watchdog counters are not stopped while CPU is stalled by DM : Watchdog counters are stopped while CPU is stalled by DM Reserved. BC[2:] Breakpoint control These bits are set and cleared by software, they are used to configure the breakpoints as shown in Table 4. BIR Break on read control This bit enables a breakpoint on a data read operation. It is set and cleared by software. : No break on data read : Break on data read BIW Break on write control This bit enables a breakpoint on a data write operation. It is set and cleared by software. : No break on data write : Break on data write Reserved. Doc ID 424 Rev 3 29/37
30 Debug module (DM) UM DM control register 2 (DM_CR2) Address: 7F97h Reset value: (h) Reserved FV_ROM Reserved FV_RAM rw rw Bit 7:3 These bits are reserved and must be kept at. FV_ROM Remap Vector table in ROM. This bit is set or cleared by software. It remaps the vector table to a ROM location Bit 2 (product dependent) instead of program memory (usually 8h). : Vector table is in Program Memory area (8h) : Vector table is in ROM memory area (depends on the product) Bit Reserved, must be kept at. FV_RAM Remap vector table in RAM This bit is set or cleared by software. It remaps the interrupt vector table to a RAM Bit location instead of program memory (usually 8h). : Vector table is in Program Memory area (8h) : Vector table is in RAM memory area (address depends on the product) 3/37 Doc ID 424 Rev 3
31 UM47 Debug module (DM) DM control/status register (DM_CSR) Address: 7F98h Reset value: (h) Reserved STE STF RST BRW BK2F BKF Reserved rw rw r r r r Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit Bit Reserved. STE Step mode enable (Read / Write) This bit is set and cleared by software. It enables Step mode. : Step mode disabled : Step mode enabled STF Step Flag (Read Only) This bit indicates that the stall was generated by Step mode. It is set and cleared by hardware. Writing to this bit does not change the bit value. : Step mode stall did not occur : Step mode stall occurred RST Reset Flag (Read Only) This bit is set by hardware when the CPU was stalled by the debug module (DM), just after reset. It is cleared by hardware when the STALL bit is cleared. Writing to this bit does not change the bit value. : No reset occurred : A reset occurred BRW Break on Read/Write Flag (Read Only). This bit gives the value of the read/write signal when a break occurs. Its value is not significant for instruction fetch breaks. It is set by hardware depending on the breakpoint conditions (see Table 4: Decoding table for breakpoint interrupt generation on page 23) and is cleared by hardware depending on the next breakpoint conditions. Writing to this bit does not change the bit value. : Breakpoint on write : Breakpoint on read BK2F Breakpoint 2 Flag (Read Only). This bit indicates that the DM stall was generated by Breakpoint 2. It is set by hardware depending on the control conditions (see Table 4: Decoding table for breakpoint interrupt generation on page 23) and is cleared by hardware when the STALL bit is cleared. Writing to this bit does not change the bit value. : Breakpoint 2 did not occur : Breakpoint 2 occurred BKF Breakpoint Flag (Read Only). This bit indicates that the DM interrupt was generated by Breakpoint. It is set by hardware depending on the control conditions (see Table 4: Decoding table for breakpoint interrupt generation on page 23) and is cleared by hardware when the STALL bit is cleared. Writing to this bit does not change the bit value. : Breakpoint did not occur : Breakpoint occurred Reserved Doc ID 424 Rev 3 3/37
32 Debug module (DM) UM DM control/status register 2 (DM_CSR2) Address: 7F99h Reset value: (h) Reserved SWBRK SWBKF STALL Reserved FLUSH rw r r rw Bits 7:6 Reserved. Must be kept at Bit 5 Bit 4 SWBKE Software breakpoint control bit (read/write) This bit is used to enable/disable the software breakpoint capability with NOP instruction : DM does not generate any event when NOP(SW BRK) instruction is fetched by CPU : DM generates an event (CPU stalled in SWIM mode) when a software break instruction is fetched by CPU. SWBKF Software breakpoint status bit (read only) This flag is set when the CPU executes the software break instruction. : No software break instruction detected. : Software break instruction detected. This bit is cleared when the STALL bit is cleared. STALL CPU stall control bit (R/W only in SWIM mode) This bit is used to stall the CPU. This bit is kept cleared if the device is not in SWIM mode. This bit is set by WOTF command to generate an ABORT equivalent command Bit 3 It is also set by an DM trap interrupt event. This bit is cleared by WOTF command to re-start the CPU. : CPU runs normally : CPU is stalled Bit: 2: Reserved. Must be kept at FLUSH Flush decode This bit is set by software to flush the instruction decode phase after a PC Bit: modification. It is cleared by hardware when the flush is completed. : Default status : Flush decode 32/37 Doc ID 424 Rev 3
33 UM47 Debug module (DM) 4.2. DM enable function register (DM_ENFCTR) Address: 7F9Ah Reset Value: (FFh) 7 ENFCT7 ENFCT6 ENFCT5 ENFCT4 ENFCT3 ENFCT2 ENFCT ENFCT rw rw rw rw rw rw rw rw Bits 7: ENFCTx Enable function This bit is set and cleared by software. it allows to freeze a particular function of a peripheral when the core is stalled. The ENFCTx bit definitions are product dependent. : Function is frozen when CPU is stalled by DM : Function is active See Appendix A for a full description of the DM_ENFCTR register. Doc ID 424 Rev 3 33/37
34 Debug module (DM) UM Summary of SWIM, DM and core register maps Table 5. STM8 address STM8 registers Register name Fh A Reset value A7 A6 A5 A4 A3 A2 A A 7Fh PCE () PC23 PC22 PC2 PC2 PC9 PC8 PC7 PC6 7F2h PCH () PC5 PC4 PC3 PC2 PC PC PC9 PC8 7F3h PCL () PC7 PC6 PC5 PC4 PC3 PC2 PC PC 7F4h XH Reset value X5 X4 X3 X2 X X X9 X8 7F5h XL Reset value X7 X6 X5 X4 X3 X2 X X 7F6h YH Reset value Y5 Y4 Y3 Y2 Y Y Y9 Y8 7F7h YL Reset value Y7 Y6 Y5 Y4 Y3 Y2 Y Y 7F8h SPH () SP5 SP4 SP3 SP2 SP SP SP9 SP8 7F9h SPL () SP7 SP6 SP5 SP4 SP3 SP2 SP SP 7FAh CC Reset value V - I H I N Z C 7F8h SWIM_CSR Reset value SAFE_MASK NO_ACCESS SWIM_DM HS OSCOFF RST HSIT PRI 7F9h DM_BKRE Reset value BKR23 BKR22 BKR2 BKR2 BKR9 BKR8 BKR7 BKR6 7F9h DM_BKRH Reset value BKR5 BKR4 BKR3 BKR2 BKR BKR BKR9 BKR8 7F92h DM_BKRL Reset value BKR7 BKR6 BKR5 BKR4 BKR3 BKR2 BKR BKR 7F93h DM_BK2RE Reset value BK2R23 BK2R22 BK2R2 BK2R2 BK2R9 BK2R8 BK2R7 BK2R6 7F94h DM_BK2RH Reset value BK2R5 BK2R4 BK2R3 BK2R2 BK2R BK2R BK2R9 BK2R8 7F95h DM_BK2RL Reset value BK2R7 BK2R6 BK2R5 BK2R4 BK2R3 BK2R2 BK2R BK2R 7F96h DM_CR Reset value WDGOFF Reserved BC2 BC BC BIR BIW Reserved 7F97h DM_CR2 Reset value Reserved FV_ROM Reserved FV_RAM 7F98h DM_CSR Reset value Reserved STE STF RST BRW BK2F BKF Reserved 7F99h DM_CSR2 Reset value Reserved Reserved SWBKE SWBKF STALL Res Reserved FLUSH 7F9Ah DM_ENFCTR Reset value ENFCT7 ENFCT6 ENFCT5 ENFCT4 ENFCT3 ENFCT2 ENFCT ENFCT. The reset value for the SP and PC registers is product dependent. Refer to the device datasheet for more details 34/37 Doc ID 424 Rev 3
35 UM47 Appendix A Description of the DM_ENFCTR register for each STM8 product Description of the DM_ENFCTR register for each STM8 product Table 6. DM_ENFCTR register Some peripherals can be frozen through the debug module during debug using the DM_ENFCTR register (address: 7F9Ah). Table 6 shows the peripherals which are frozen by the bits (ENFCT to ENFCT7) of the DM_ENFCTR register. Peripherals which are frozen by the bits of the DM_ENFCTR register for each STM8 product STM8AF5A STM8S27/28 (28 Kbyte die) STM8AF66 STM8S5 (32 Kbyte die) STM8AF5B (256 Kbyte die) STM8S3/93 (8 Kbyte die) STM8L (8 Kbyte die) STM8L5x (32 Kbyte die) Bit Peripheral ENFCT Timer4/ System timer Timer4/ System timer Timer4/ System timer Timer4/ System timer ENFCT Timer2 Timer2 Tmer2 Tmer2 Timer2 Timer2 ENFCT2 Timer3 Timer3 Tmer3 Not used Timer3 Timer3 ENFCT3 Timer Timer Tmer Timer ENFCT4 ENFCT5 ENFCT6 bit not used bit not used bit not used bit not used bit not used bit not used bit not used Tmer5 I 2 C2 bit not used bit not used bit not used ENFCT7 I 2 C I 2 C I 2 C I 2 C I 2 C bit not used Timer4 bit not used bit not used bit not used I 2 C Timer Timer4 DMA RTC bit not used Doc ID 424 Rev 3 35/37
36 Revision history UM47 Revision history Table 7. Document revision history Date Revision Changes 5-Jan-28 Initial release. -Dec Jun-2 3 Updated documentation references in Introduction. Section 3.2: SWIM entry sequence: updated Figure 4 and explanation. Section 3.3: Bit format: replaced OBL bit with HSIT bit. Added Appendix A. Introduction: updated titles of reference documents. Updated name of IOM bit to SWIM disable bit (SWD) in Section 3.: Operating modes, Figure 3, and SWIM control status register (SWIM_CSR). Updated name of MCR register to CFG_GCR register in Section 3.: Operating modes. 36/37 Doc ID 424 Rev 3
37 UM47 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. 2 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America Doc ID 424 Rev 3 37/37
AN3332 Application note
Application note Generating PWM signals using STM8S-DISCOVERY Application overview This application user manual provides a short description of how to use the Timer 2 peripheral (TIM2) to generate three
AN3265 Application note
Application note Handling hardware and software failures with the STM8S-DISCOVERY Application overview This application is based on the STM8S-DISCOVERY. It demonstrates how to use the STM8S window watchdog
AN3354 Application note
Application note STM32F105/107 in-application programming using a USB host 1 Introduction An important requirement for most Flash-memory-based systems is the ability to update firmware installed in the
EVL185W-LEDTV. 185 W power supply with PFC and standby supply for LED TV based on the L6564, L6599A and Viper27L. Features.
Features 185 W power supply with PFC and standby supply for LED TV based on the L6564, L6599A and Viper27L Data brief Universal input mains range: 90 264 Vac - frequency 45 65 Hz Output voltage 1: 130
AN3998 Application note
Application note PDM audio software decoding on STM32 microcontrollers 1 Introduction This application note presents the algorithms and architecture of an optimized software implementation for PDM signal
AN3252 Application note
Application note Building a wave generator using STM8L-DISCOVERY Application overview This application note provides a short description of how to use the STM8L-DISCOVERY as a basic wave generator for
AN2824 Application note
Application note STM32F10xxx I 2 C optimized examples Introduction The aim of this application note is to provide I 2 C firmware optimized examples based on polling, interrupts and DMA, covering the four
ST13005. High voltage fast-switching NPN power transistor. Features. Applications. Description
High voltage fast-switching NPN power transistor Datasheet production data Features Low spread of dynamic parameters Minimum lot-to-lot spread for reliable operation Very high switching speed Applications
2STBN15D100. Low voltage NPN power Darlington transistor. Features. Application. Description
Low voltage NPN power Darlington transistor Features Good h FE linearity High f T frequency Monolithic Darlington configuration with integrated antiparallel collector-emitter diode TAB Application Linear
AN3155 Application note
Application note USART protocol used in the STM32 bootloader Introduction This application note describes the USART protocol used in the STM32 microcontroller bootloader. It details each supported command.
AN2680 Application note
Application note Fan speed controller based on STDS75 or STLM75 digital temperature sensor and ST72651AR6 MCU Introduction This application note describes the method of defining the system for regulating
TN0023 Technical note
Technical note Discontinuous flyback transformer description and design parameters Introduction The following is a general description and basic design procedure for a discontinuous flyback transformer.
AN2604 Application note
AN2604 Application note STM32F101xx and STM32F103xx RTC calibration Introduction The real-time clock (RTC) precision is a requirement in most embedded applications, but due to external environment temperature
AN2389 Application note
Application note An MCU-based low cost non-inverting buck-boost converter for battery chargers Introduction As the demand for rechargeable batteries increases, so does the demand for battery chargers.
AN2557 Application note
Application note STM32F10x in-application programming using the USART Introduction An important requirement for most Flash-memory-based systems is the ability to update firmware when installed in the end
ESDLIN1524BJ. Transil, transient voltage surge suppressor diode for ESD protection. Features. Description SOD323
Transil, transient voltage surge suppressor diode for ESD protection Datasheet production data Features Max peak pulse power 160 W (8/0 µs) Asymmetrical bidirectional device Stand-off voltage: 15 and 4
Description. Table 1. Device summary. Order code Temperature range Package Packaging Marking
14-stage ripple carry binary counter/divider and oscillator Applications Automotive Industrial Computer Consumer Description Datasheet - production data Features Medium speed operation Common reset Fully
BD238. Low voltage PNP power transistor. Features. Applications. Description. Low saturation voltage PNP transistor
Low voltage PNP power transistor Features Low saturation voltage PNP transistor Applications Audio, power linear and switching applications Description The device is manufactured in planar technology with
AN4108 Application note
Application note How to set up a HTTPS server for In-Home display with HTTPS Introduction This application note describes how to configure a simple SSL web server using the EasyPHP free application to
AN4156 Application note
Application note Hardware abstraction layer for Android Introduction This application note provides guidelines for successfully integrating STMicroelectronics sensors (accelerometer, magnetometer, gyroscope
SPC5-FLASHER. Flash management tool for SPC56xx family. Description. Features
Flash management tool for SPC56xx family Data brief Flash verify: check the Flash content with a binary image file Unsecure sequence for censored device: sending the private password selected from the
BD241A BD241C. NPN power transistors. Features. Applications. Description. NPN transistors. Audio, general purpose switching and amplifier transistors
BD241A BD241C NPN power transistors Features. NPN transistors Applications Audio, general purpose switching and amplifier transistors Description The devices are manufactured in Planar technology with
AN3990 Application note
Application note Upgrading STM32F4DISCOVERY board firmware using a USB key Introduction An important requirement for most Flash memory-based systems is the ability to update the firmware installed in the
DDSL01. Secondary protection for DSL lines. Features. Description
Secondary protection for DSL lines Features Stand off voltage: 30 V Surge capability: I pp = 30 A 8/20 µs Low capacitance device: 4.5 pf at 2 V RoHS package Low leakage current: 0.5 µa at 25 C 3 2 Description
UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction
User manual Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software Introduction This document provides an introduction on how to use IAR Embedded Workbench for ARM software
MC33079. Low noise quad operational amplifier. Features. Description
Low noise quad operational amplifier Datasheet production data Features Low voltage noise: 4.5 nv/ Hz High gain bandwidth product: 15 MHz High slew rate: 7 V/µs Low distortion: 0.002% Large output voltage
Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension
User manual Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension Introduction This document describes the demonstration user interface that was developed to illustrate use
AN3353 Application note
Application note IEC 61000-4-2 standard testing Introduction This Application note is addressed to technical engineers and designers to explain how STMicroelectronics protection devices are tested according
UM1613 User manual. 16-pin smartcard interface ST8034P demonstration board. Introduction
User manual 16-pin smartcard interface ST8034P demonstration board Introduction The purpose of this document is to describe, and provide information on, how to efficiently use the ST8034P smartcard interface
UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction
User manual Getting started with.net Micro Framework on the STM32F429 Discovery kit Introduction This document describes how to get started using the.net Micro Framework (alias NETMF) on the STM32F429
BZW50. Transil, transient voltage surge suppressor (TVS) Features. Description
Transil, transient voltage surge suppressor (TVS) Datasheet production data Features Peak pulse power: 5000 W (10/0 µs) Stand-off voltage range from 10 V to 180 V Unidirectional and bidirectional types
ST19NP18-TPM-I2C. Trusted Platform Module (TPM) with I²C Interface. Features
Trusted Platform Module (TPM) with I²C Interface Data brief Features Single-chip Trusted Platform Module (TPM) Embedded TPM 1.2 firmware I²C communication interface (Slave mode) Architecture based on ST19N
How To Write To An Eeprom Memory On A Flash Memory On An Iphone Or Ipro Memory On Microsoft Flash Memory (Eeprom) On A Microsoft Microsoft Powerbook (Ai) 2.2.2
Application note EEPROM emulation in STM32F10x microcontrollers Introduction Many applications require EEPROM (electrically erasable programmable read-only memory) for non-volatile data storage. For low-cost
BD135 - BD136 BD139 - BD140
BD135 - BD136 BD139 - BD140 Complementary low voltage transistor Features Products are pre-selected in DC current gain Application General purpose Description These epitaxial planar transistors are mounted
ULN2001, ULN2002 ULN2003, ULN2004
ULN2001, ULN2002 ULN2003, ULN2004 Seven Darlington array Datasheet production data Features Seven Darlingtons per package Output current 500 ma per driver (600 ma peak) Output voltage 50 V Integrated suppression
UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction
User manual Getting started with STM32F429 Discovery software development tools Introduction This document describes the software environment and development recommendations required to build an application
Single LNB supply and control IC DiSEqC 1.X compliant with EXTM based on the LNBH29 in a QFN16 (4x4) Description
Single LNB supply and control IC DiSEqC 1.X compliant with EXTM based on the LNBH29 in a QFN16 (4x4) Data brief Low-drop post regulator and high-efficiency step-up PWM with integrated power N-MOS allowing
ULN2801A, ULN2802A, ULN2803A, ULN2804A
ULN2801A, ULN2802A, ULN2803A, ULN2804A Eight Darlington array Datasheet production data Features Eight Darlington transistors with common emitters Output current to 500 ma Output voltage to 50 V Integral
DSL01-xxxSC5. Secondary protection for DSL lines. Features. Description. Applications. Benefits. Complies with the following standards
-xxxsc5 Secondary protection for DSL lines Features Low capacitance devices: -xxxsc5: Delta C typ = 3.5 pf High surge capability: 30 A - 8/20 µs Voltage: 8 V, 10.5 V, 16 V, and 24 V RoHS package Benefits
AN3110 Application note
Application note Using the STVM100 to automatically adjust VCOM voltage in e-paper Introduction The widespread use of multimedia electronic devices, coupled with environmental concerns over the manufacturing
AN4128 Application note
Application note Demonstration board for Bluetooth module class 1 SBT2632C1A.AT2 Introduction This document describes the STEVAL-SPBT4ATV3 demonstration board (dongle) for the Bluetooth class 1 SPBT2632C1A.AT2
Order code Temperature range Package Packaging
ST485B ST485C Low power RS-485/RS-422 transceiver Features Low quiescent current: 300 µa Designed for RS-485 interface application - 7 V to 12 V common mode input voltage range Driver maintains high impedance
AN3270 Application note
Application note Using the STM8L16x AES hardware accelerator Introduction The purpose of cryptography is to protect sensitive data to avoid it being read by unauthorized persons. There are many algorithms
UM1790 User manual. Getting started with STM32L053 discovery kit software development tools. Introduction
User manual Getting started with STM32L053 discovery kit software development tools Introduction This document describes the software environment recommendations required to build an application using
UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction
User manual Getting started with STM32 Nucleo board software development tools Introduction The STM32 Nucleo board (NUCLEO-F030R8, NUCLEO-F072RB, NUCLEO-F103RB, NUCLEO-F302R8, NUCLEO-F401RE, NUCLEO-L152RE)
EN: This Datasheet is presented by the m anufacturer. Please v isit our website for pricing and availability at www.hest ore.hu.
EN: This Datasheet is presented by the m anufacturer. Please v isit our website for pricing and availability at www.hest ore.hu. 2N3055, MJ2955 Complementary power transistors Features Datasheet - production
ETP01-xx21. Protection for Ethernet lines. Features. Description. Applications. Benefits. Complies with the following standards
ETP0-xx2 Protection for Ethernet lines Features Differential and common mode protection Telcordia GR089 Intrabuilding: 50 A, 2/0 µs ITU-T K20/2: 40 A, 5/30 µs Low capacitance: 3 pf max at 0 V UL94 V0 approved
AN974 APPLICATION NOTE
AN974 APPLICATION NOTE Real time clock with ST7 Timer Output Compare By MCD Application Team 1 INTRODUCTION The purpose of this note is to present how to use the ST7 Timer output compare function. As an
LM337. Three-terminal adjustable negative voltage regulators. Features. Description
Three-terminal adjustable negative voltage regulators Datasheet - production data current limit, thermal overload protection and safe area protection. All overload protection circuitry remains fully functional
L6234. Three phase motor driver. Features. Description
Three phase motor driver Features Supply voltage from 7 to 52 V 5 A peak current R DSon 0.3 Ω typ. value at 25 C Cross conduction protection TTL compatible driver Operating frequency up to 150 khz Thermal
STTH2R06. High efficiency ultrafast diode. Features. Description
STTH2R6 High efficiency ultrafast diode Features Very low conduction losses Negligible switching losses Low forward and reverse recovery times High junction temperature Description A K The STTH2R6 uses
UA741. General-purpose single operational amplifier. Features. Applications. Description. N DIP8 (plastic package)
General-purpose single operational amplifier Datasheet - production data N DIP8 (plastic package) D SO8 (plastic micropackage) Pin connections (top view) 1 - Offset null 1 2 - Inverting input 3 - Non-inverting
LM135-LM235-LM335. Precision temperature sensors. Features. Description
Precision temperature sensors Features Directly calibrated in K 1 C initial accuracy Operates from 450µA to 5mA Less than 1Ω dynamic impedance TO-92 (Plastic package) Description The LM135, LM235, LM335
M24LRxx/CR95HF application software installation guide
User manual M24LRxx/CR95HF application software installation guide Introduction This user manual describes the procedures to install the different software drivers required to use the DEVKIT-M24LR-A development
STP60NF06FP. N-channel 60V - 0.014Ω - 30A TO-220FP STripFET II Power MOSFET. General features. Description. Internal schematic diagram.
N-channel 60V - 0.014Ω - 30A TO-220FP STripFET II Power MOSFET General features Type V DSS R DS(on) I D STP60NF06FP 60V
STP60NF06. N-channel 60V - 0.014Ω - 60A TO-220 STripFET II Power MOSFET. General features. Description. Internal schematic diagram.
N-channel 60V - 0.014Ω - 60A TO-220 STripFET II Power MOSFET General features Type V DSS R DS(on) I D STP60NF06 60V
STN3NF06L. N-channel 60 V, 0.07 Ω, 4 A, SOT-223 STripFET II Power MOSFET. Features. Application. Description
N-channel 60 V, 0.07 Ω, 4 A, SOT-223 STripFET II Power MOSFET Features Type V DSS (@Tjmax) Exceptional dv/dt capability Avalanche rugged technology 100% avalanche tested R DS(on) max STN3NF06L 60 V < 0.1
TN0072 Technical note
TN0072 Technical note Introduction The documentation provides an overview of the STM32 devices and various toolchains. It provides information on the STM32 characteristics and how they are supported. Many
Description. Table 1. Device summary
2 A positive voltage regulator IC Description Datasheet - production data Features TO-220 Output current up to 2 A Output voltages of 5; 7.5; 9; 10; 12; 15; 18; 24 V Thermal protection Short circuit protection
AN3359 Application note
Application note Low cost PCB antenna for 2.4GHz radio: Meander design 1 Introduction This application note is dedicated to the STM32W108 product family from STMicroelectronics. One of the main reasons
LM134-LM234-LM334. Three terminal adjustable current sources. Features. Description
Three terminal adjustable current sources Features Operates from 1V to 40V 0.02%/V current regulation Programmable from 1µA to 10mA ±3% initial accuracy Description The LM134/LM234/LM334 are 3-terminal
AN2866 Application note
Application note How to design a 13.56 MHz customized tag antenna Introduction RFID (radio-frequency identification) tags extract all of their power from the reader s field. The tags and reader s antennas
Description. IO and RF AGC. ASIC controller and power management. Carrier recovery loop. GPIO switch matrix. Lock indicator and monitoring DVBS2 FEC
Multi-standard advanced demodulator for satellite digital TV and data services set-top boxes Data Brief Features Demodulation DIRECTV TM and DVBS QPSK DVBS2 QPSK and 8PSK Digital Nyquist root filter with
L78MxxAB L78MxxAC. Precision 500 ma regulators. Features. Description
L78MxxAB L78MxxAC Precision 500 ma regulators Features Output current to 0.5 A Output voltages of 5; 6; 8; 9; 10; 12; 15; 18; 24 V Thermal overload protection Short circuit protection Output transition
HANDLING SUSPEND MODE ON A USB MOUSE
APPLICATION NOTE HANDLING SUSPEND MODE ON A USB MOUSE by Microcontroller Division Application Team INTRODUCTION All USB devices must support Suspend mode. Suspend mode enables the devices to enter low-power
P6KE. Transil, transient voltage surge suppressor (TVS) Features. Description. Complies with the following standards
Transil, transient voltage surge suppressor (TVS) Datasheet production data Features Peak pulse power: 600 W (10/0 µs ) Stand-off voltage range 6.8 to 440 V Unidirectional and bidirectional types Low clamping
TDA2003 10W CAR RADIO AUDIO AMPLIFIER
TDA2003 10W CAR RADIO AUDIO AMPLIFIER DESCRIPTION The TDA 2003 has improved performance with the same pin configuration as the TDA 2002. The additional features of TDA 2002, very low number of external
STTH1R04-Y. Automotive ultrafast recovery diode. Features. Description
Automotive ultrafast recovery diode Features Datasheet - production data K SMA STTH1R4AY Table 1. Device summary Symbol Value I F(AV) 1 A V RRM 4 V T j (max) 175 C V F (typ) t rr (typ) A K.9 V 14 ns A
STEVAL-IEG001V2. Smart real-time vehicle tracking system. Features
Smart real-time vehicle tracking system Data brief Features Real-time vehicle tracking through GPS/GSM/GPRS. Vehicle location coordinates acquired using a Telit GPS module and sent over GPRS to web server-based
SPC5-CRYP-LIB. SPC5 Software Cryptography Library. Description. Features. SHA-512 Random engine based on DRBG-AES-128
SPC5 Software Cryptography Library Data brief SHA-512 Random engine based on DRBG-AES-128 RSA signature functions with PKCS#1v1.5 ECC (Elliptic Curve Cryptography): Key generation Scalar multiplication
Table 1. Absolute maximum ratings (T amb = 25 C) Symbol Parameter Value Unit. ISO 10605 - C = 330 pf, R = 330 Ω : Contact discharge Air discharge
Automotive dual-line Transil, transient voltage suppressor (TVS) for CAN bus Datasheet - production data Complies with the following standards ISO 10605 - C = 150 pf, R = 330 Ω : 30 kv (air discharge)
AN1754 APPLICATION NOTE
AN1754 APPLICATION NOTE DATA LOGGING PROGRAM FOR TESTING ST7 APPLICATIONS VIA ICC by Microcontroller Division Application Team INTRODUCTION Data logging is the process of recording data. It is required
STCS1. 1.5 A max constant current LED driver. Features. Applications. Description
1.5 A max constant current LED driver Features Up to 40 V input voltage Less than 0.5 V voltage overhead Up to 1.5 A output current PWM dimming pin Shutdown pin LED disconnection diagnostic DFN8 (3x3 mm)
TDA2004R. 10 + 10 W stereo amplifier for car radio. Features. Description
10 + 10 W stereo amplifier for car radio Features Low distortion Low noise Protection against: Output AC short circuit to ground Overrating chip temperature Load dump voltage surge Fortuitous open ground
AN1819 APPLICATION NOTE Bad Block Management in Single Level Cell NAND Flash Memories
APPLICATION NOTE Bad Block Management in Single Level Cell NAND Flash Memories This Application Note explains how to recognize factory generated Bad Blocks, and to manage Bad Blocks that develop during
Description SO-8. series. Furthermore, in the 8-pin configuration Very low-dropout voltage (0.2 V typ.)
ery low-dropout voltage regulator with inhibit function TO-92 Bag TO-92 Tape and reel Ammopack 1 2 3 SO-8 Description Datasheet - production data The is a very low-dropout voltage regulator available in
AN2760 Application note
Application note Using clock distribution circuits in smart phone system design Introduction As smart phones become more and more popular in the market, additional features such as A-GPS, Bluetooth, WLAN
UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents
User manual Developing and debugging your STM8S-DISCOVERY application code Introduction This document complements the information in the STM8S datasheets by describing the software environment and development
AN2703 Application note
Application note list for SCRs, TRIACs, AC switches, and DIACS Introduction All datasheet parameters are rated as minimum or maximum values, corresponding to the product parameter distribution. In each
STCS1A. 1.5 A max constant current LED driver. Features. Applications. Description
1.5 A max constant current LED driver Features Up to 40 V input voltage Less than 0.5 V voltage overhead Up to 1.5 A output current PWM dimming pin Shutdown pin LED disconnection diagnostic DFN8 (3 x 3
STDP2690. Advanced DisplayPort to DisplayPort (dual mode) converter. Features. Applications
Advanced DisplayPort to DisplayPort (dual mode) converter Data brief Features DisplayPort dual-mode transmitter DP 1.2a compliant Link rate HBR2/HBR/RBR 1, 2, or 4 lanes AUX CH 1 Mbps Supports edp operation
VN05N. High side smart power solid state relay PENTAWATT. Features. Description
High side smart power solid state relay Features Type V DSS R DS(on) I OUT V CC VN05N 60 V 0.18 Ω 13 A 26 V Output current (continuous): 13A @ Tc=25 C 5V logic level compatible input Thermal shutdown Under
APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.
APPLICATION NOTE Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer Introduction Atmel AVR 8-bit Microcontroller This application note describes how to implement a real time counter (RTC)
STGB10NB37LZ STGP10NB37LZ
STGB10NB37LZ STGP10NB37LZ 10 A - 410 V internally clamped IGBT Features Low threshold voltage Low on-voltage drop Low gate charge TAB TAB High current capability High voltage clamping feature Applications
LM2901. Low-power quad voltage comparator. Features. Description
Low-power quad voltage comparator Features Wide single supply voltage range or dual supplies for all devices: +2 V to +36 V or ±1 V to ±18 V Very low supply current (1.1 ma) independent of supply voltage
AN4368 Application note
Application note Signal conditioning for pyroelectric passive infrared (PIR) sensors Sylvain Colliard-Piraud Introduction Pyroelectric passive infrared (PIR) sensors are widely used in daily life. They
STM6315. Open drain microprocessor reset. Features
Open drain microprocessor reset Features Low supply current of 1.5µA (typ) ±1.8% reset threshold accuracy (25 C) Guaranteed RST assertion down to V CC = 1.0V Open drain RST output can exceed V CC Power
Description. Table 1. Device summary. Order codes. TO-220 (single gauge) TO-220 (double gauge) D²PAK (tape and reel) TO-220FP
1.2 V to 37 V adjustable voltage regulators Description Datasheet - production data TO-220 TO-220FP The LM217, LM317 are monolithic integrated circuits in TO-220, TO-220FP and D²PAK packages intended for
AN3969 Application note
Application note EEPROM emulation in STM32F40x/STM32F41x microcontrollers Introduction EEPROMs (Electrically Erasable Programmable Read-Only Memory) are often used in industrial applications to store updateable
STP55NF06L STB55NF06L - STB55NF06L-1
General features STP55NF06L STB55NF06L - STB55NF06L-1 N-channel 60V - 0.014Ω - 55A TO-220/D 2 PAK/I 2 PAK STripFET II Power MOSFET Type V DSS R DS(on) I D STP55NF06L 60V
NE555 SA555 - SE555. General-purpose single bipolar timers. Features. Description
NE555 SA555 - SE555 General-purpose single bipolar timers Features Low turn-off time Maximum operating frequency greater than 500 khz Timing from microseconds to hours Operates in both astable and monostable
AN438 APPLICATION NOTE SAFETY PRECAUTIONS FOR DEVELOPMENT TOOL TRIAC + MICROCONTROLLER
AN438 APPLICATION NOTE SAFETY PRECAUTIONS FOR DEVELOPMENT TOOL TRIAC + MICROCONTROLLER INTRODUCTION The goal of this paper is to analyse the different ways to configure a micro-controller and a development
AN4032 Application note
Application note Interfacing an HD44780 2-line LCD display with the STM8SVLDISCOVERY Introduction This application note describes how to use a firmware example that drives a standard HD44780 2-line LCD
AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.
SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES 1. Introduction C8051F3xx and C8051F41x devices are equipped with an SMBus serial I/O peripheral that is compliant with both the System Management
AN2658 Application note
Application note Using the analog to digital converter of the STM8S microcontroller Introduction The purpose of this application note is to explain how to use the Analog to Digital Converter implemented
UM0462 User manual. STM32 and STM8 Flash loader demonstrator. Introduction
User manual STM32 and STM8 Flash loader demonstrator Introduction The purpose of this document is to describe the STMicroelectronics STM32 and STM8 Flash loader demonstrator application that was developed
AN3997 Application note
Application note Audio playback and recording using the STM32F4DISCOVERY 1 Introduction This application note describes the audio (wave) playback and recording application based on the STM32F4xx microcontroller
NE555 SA555 - SE555. General-purpose single bipolar timers. Features. Description
NE555 SA555 - SE555 General-purpose single bipolar timers Features Low turn-off time Maximum operating frequency greater than 500 khz Timing from microseconds to hours Operates in both astable and monostable
STTH110. High voltage ultrafast rectifier. Description. Features
High voltage ultrafast rectifier Datasheet - production data K Description The STTH110, which is using ST ultrafast high voltage planar technology, is especially suited for free-wheeling, clamping, snubbering,
Obsolete Product(s) - Obsolete Product(s)
Vertical deflection booster for 3 App TV/monitor applications with 0 V flyback generator Features Figure. Heptawatt package Power amplifier Flyback generator Stand-by control Output current up to 3.0 App
