Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
49
Добавлен:
01.03.2016
Размер:
544.67 Кб
Скачать

Debug module (DM)

UM0470

 

 

4 Debug module (DM)

4.1Introduction

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.2Main 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

20/37

Doc ID 14024 Rev 3

UM0470

Debug module (DM)

 

 

Figure 11. Debug module block diagram

 

 

 

 

WATCHDOG

 

 

 

Debug Module (DM)

WATCHDOG CONTROL

 

 

 

 

 

 

 

 

DM REGISTERS

LOGIC

 

 

 

 

 

 

 

READ/WRITE

 

 

 

 

LOGIC

 

 

 

 

 

 

DM_BK1 DM_BK2

-

 

 

 

 

 

SWIM

SWIM

 

 

 

-

 

 

 

 

 

 

 

 

 

 

BC2

 

 

SWBKE

SWBKF

DM

BC1

 

 

BREAKPOINT

 

 

 

enable bit

BC0

 

EMU/DMA

flag

LOGIC

 

 

BIR

 

interface

.

 

 

 

SOFTWARE

 

 

 

BIW

 

BREAK

 

 

 

-

 

 

 

 

 

 

RESET

 

 

DM_CSR1

DM_CR1

 

 

 

 

 

 

 

 

STE STF RST BRW BK2F BK1F

 

 

STM8

 

 

 

 

 

CPU

 

 

 

 

 

 

 

 

 

DM STALL

 

DM STALL/TRAP

 

 

(From

 

 

 

 

 

Slave DM

 

 

 

STALL bit

 

when

 

 

 

 

available)

 

 

 

SWTRAP bit

 

 

 

 

 

 

 

 

 

 

EXT STALL

EXT

 

 

 

 

MANAGEMENT

 

 

 

 

STALL

 

 

SWTRF

 

 

 

 

 

 

FV_ROM

 

 

flag

 

 

FV_RAM

 

 

 

 

 

 

 

 

 

 

DM_CR2

 

PERIPHERALS

 

 

 

ENFCTx

 

(Timers, USB,...)

 

 

 

 

 

 

 

DM_ENFCT

 

 

 

 

 

Doc ID 14024 Rev 3

21/37

Соседние файлы в папке Минимум документации STM8