
AT32 Printf Debug Demo
2019.08.05
9
Rev 1.0.2
2.2
Redirect Printf as serial ports in IAR
2.2.1 Introduction
Redirect the Printf function to a set of actual serial ports in the chip, and output via TX pin and
finally implement information interaction through the serial port debugging assistant.
2.2.2 Example code
002_Printf_Test_IAR_USART2\USER
2.2.3 Environment and hardware
2.2.3.1 Development environment
This method is used in the IAR environment. The compiling environment used in the example code
is IAR_V6/7/8 with the hardware board AT-START-F403_V1.2.
2.2.3.2 Hardware connection
2.2.3.2.1
J-Link/AT-Link&... connection
J-Link/AT-Link&... connection
Table 3. Hardware connection table -- (without JTDO)
Hardware connection table
--(without JTDO)
No.
AT-START-F403_V1.2
J-Link/AT-
Link&…
Attention
1
3.3V
3.3V
None
2
PA13
SWDIO
Must Pull up external
3
PA14
SWCLK
Must Pull down external
4
NRST
RSTn
None
5
GND
GND
None
2.2.3.2.2
USART2 connection
Table 4.
H
ardware connection table
--(USART)
hardware connection table
--(USART)
序号
AT-START-F403_V1.2
USB_To_TTL(CH340)
Attention
1
GND
GMD
None
2
PA2
RXD
None
3
PA3
TXD
None