29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Debug support (DBG)<br />

RM0008<br />

29.17.10 Example of configuration<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Set the bit TRCENA in the Debug Exception <strong>and</strong> Monitor Control Register (DEMCR)<br />

Write the TPIU Current Port Size Register to the desired value (default is 0x1 for a 1-bit<br />

port size)<br />

Write TPIU Formatter <strong>and</strong> Flush Control Register to 0x102 (default value)<br />

Write the TPIU Select Pin Protocol to select the sync or async mode. Example: 0x2 for<br />

async NRZ mode (UART like)<br />

Write the DBGMCU control register to 0x20 (bit IO_TRACEN) to assign TRACE I/Os for<br />

async mode. A TPIU Sync packet is emitted at this time (FF_FF_FF_7F)<br />

Configure the ITM <strong>and</strong> write the ITM Stimulus register to output a value<br />

29.18 DBG register map<br />

Table 214.<br />

Addr.<br />

The following table summarizes the Debug registers.<br />

DBG register map <strong>and</strong> reset values<br />

Register<br />

31<br />

30<br />

29<br />

28<br />

27<br />

26<br />

25<br />

24<br />

23<br />

22<br />

21<br />

20<br />

19<br />

18<br />

17<br />

16<br />

15<br />

14<br />

13<br />

12<br />

11<br />

10<br />

9<br />

8<br />

7<br />

6<br />

5<br />

4<br />

3<br />

2<br />

1<br />

0<br />

0xE0042000<br />

0xE0042004<br />

DBGMCU_<br />

IDCODE<br />

REV_ID<br />

Reserved<br />

DEV_ID<br />

Reset value (1) X X X X X X X X X X X X X X X X X X X X X X X X X X X X<br />

DBGMCU_CR<br />

Reserved<br />

DGB_CAN2_STOP<br />

DBG_TIM7_STOP<br />

DBG_TIM6_STOP<br />

DBG_TIM5_STOP<br />

DBG_TIM8_STOP<br />

DBG_I2C2_SMBUS_TIMEOUT<br />

DBG_I2C1_SMBUS_TIMEOUT<br />

DBG_CAN1_STOP<br />

DBG_TIM4_STOP<br />

DBG_TIM3_STOP<br />

DBG_TIM2_STOP<br />

DBG_TIM1_STOP<br />

DBG_WWDG_STOP<br />

DBG_IWDGSTOP<br />

TRACE_MODE[1:0]<br />

TRACE_IOEN<br />

Reserved<br />

DBG_STANDBY<br />

DBG_STOP<br />

DBG_SLEEP<br />

Reset value 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />

1. The reset value is product dependent. For more information, refer to Section 29.6.1: MCU device ID code.<br />

980/995 Doc ID 13902 Rev 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!