Login

Why register?

  • Download software and technical materials
  • Purchase products at our on-line shop
  • Receive design news to stay up-to-date with Emcraft's new solutions

 

 

Connecting Serial Console to the STM32F429 Discovery Print

 

Running Linux (uClinux) on the STM32F429 requires a serial console. U-Boot and Linux make use of the serial console to print messages and provide an interactive user interface. You won't be able to do much unless you have access to the serial console.

Both U-Boot and Linux are configured to use USART1 for the serial console on the STM32F429 Discovery.

On the STM32F429 Discovery, USART1 interface is available at UART levels on the extension headers. In order to connect the serial console to a PC, you must convert the UART interface either to an RS-232 interface or to a USB interface. This requires connecting an external device ("dongle") to the STM32F429 Discovery. There are various such devices available on the market. One specific device we have been using (among others) is the WaveShare FT232 USB UART board:

On the STM32F429 Discovery side, the connections to a converter board, such as the above USB UART board, must be as follows:

STM32F429 Pin STM32F429 Function STM32F429 Discovery Board
Connection
WaveShare FT232 USB UART Board Connection Notes
PA9 USART1_TX P1.52 CON6.4 (RXD)
PA10 USART1_RX P1.51 CON6.3 (TXD)
VDD VDD P1.22 CON6.1 (VCCIO) +3.3V VCCIO
GND GND P1.64 CON6.2 (GND)
- - P1.1 J3.3 (5V) +5V power


Assuming a connection using an USB UART board, on the Linux PC the STM32F429 serial console will be visible as a /dev/ttyUSBx device. The U-Boot and Linux software configures the console for 115.2 Kps operation.

There are various serial communication tools available for Linux, the most popular perhaps being kermit. kermit is a very powerful tool that can be run in interactive mode or controlled by a script. There is abandunt documentation on kermit avialable in the Internet, if you require details.

One possibility is to define on the host a shell script similar to the one below:

$ vi console-stm32f429.script
#!/usr/local/bin/kermit

set port /dev/ttyUSB1
set speed 115200
set carrier-watch off
set flow-control none
set prefixing all
c

Change the file mode to make the script an executable file:

$ chmod +x console-stm32f429.script

Then run the script whenever you need to get access to the console:

$ ./console-stm32f429.script
Connecting to /dev/ttyUSB1, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

STM32F429-DISCO>

To exit kermit, type Ctrl-\ and then q.