UART for Serial Console or HAT on Raspberry Pi 3

It seems the recently launched Raspberry Pi 3 behaves differently with regards to the UART interface on the GPIO header. In this guide I go through the steps I took to get the UART working for serial console or HAT communication.

I am assuming you are using a recent Raspbian Jessie image (2016-03-18 or more recent) on Raspberry Pi 3, that the file system has been expanded and that enough space is left for the software updates to be installed.

Let’s go!

Update Software

The first thing you’ll need to do is to ensure all software components are up-to-date.

Update the repository and upgrade the installed packages:

Update the firmware:

Reboot to apply the changes:

Enable UART

A new property has been introduced to enable the UART on the Pi. This property will put the core frequency to a minimum, ensuring stability. It’s possible to put the core frequency to maximum as well, assuming the power supply is powerful enough and the Pi 3 is properly cooled (heatsink!).

Enabling UART with minimum core frequency:

Enabling UART with maximum core frequency:

More information on this newly introduced property can be found here:

Below are two screenshots: on the left, console before update, on the right, after the update and enable. The results are clearly better!

Screen Shot 2016-03-24 at 20.13.42 Screen Shot 2016-03-24 at 20.23.49

Disable Console

In case you would like to connect a HAT using the UART interface, it’s recommended to disable the console.

To disable the console, edit the following file as follows:

Reboot to apply the change:

You can verify something is being sent/received by the HAT’s UART with the commands below.

Set the baudrate of the interface, for example 57600:

Dump the data of the serial interface:

If you see data, your HAT’s UART should be working and can now be used in your script/application.

The screenshot below demonstrates my EnOceanPi HAT providing data to OpenHab using the GPIO’s UART:

IMG_1142 Screen Shot 2016-03-24 at 21.58.19




© Frederick Vandenbosch, 2014-2019. Unauthorised use and/or duplication of this material without express and written permission from this blog’s author and owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Frederick Vandenbosch with appropriate and specific direction to the original content.