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

UM0470

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 pin

SWIM interface for tools

Jumper selection for debug purposes

Doc ID 14024 Rev 3

7/37

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