User Manual

Table Of Contents
119
23.1 Mini UART and CPU Core Frequency
The baud rate of the mini UART is linked to the core frequency of the VPU on the VC4 GPU. This means
that, as the VPU frequency governor varies the core frequency, the baud rate of the mini UART also changes.
This makes the mini UART of limited use in the default state. By default, if the mini UART is selected for use as
the primary UART, it will be disabled. To enable it, add enable_uart=1 to config.txt. This will also fix the core
frequency to 250MHz (unless force_turbo is set, when it will be fixed to the VPU turbo frequency). When the
mini UART is not the primary UART, for example you are using it to connect to the Bluetooth controller, you
must add core_freq=250 to config.txt, otherwise the mini UART will not work.
The default value of the enable_uart ag depends on the actual roles of the UARTs, so that if ttyAMA0 is
assigned to the Bluetooth module, enable_uart defaults to 0. If the mini UART is assigned to the Bluetooth
module, then enable_uart defaults to 1. Note that if the UARTs are reassigned using a Device Tree Overlay
(see below), enable_uart defaults will still obey this rule.
23.2 Disabling Linux's Use of Console UART
In a default install of Raspbian, the primary UART (serial0) is assigned to the Linux console. Using the
serial port for other purposes requires this default behaviour to be changed. On startup, systemd checks the
Linux kernel command line for any console entries, and will use the console defined therein. To stop this
behaviour, the serial console setting needs to be removed from command line.
This can be done by using the raspi-config utility, or manually.
sudo raspi-config
Select option 5, Interfacing options, then option P6, Serial, and select No. Exit raspi-config.
To manually change the settings, edit the kernel command line with sudo nano
/boot/cmdline.txt . Find the console entry that refers to the serial0 device, and remove it, including the
baud rate setting. It will look something like console=serial0,115200 . Make sure the rest of the line remains
the same, as errors in this configuration can stop the Raspberry Pi from booting.
Reboot the Raspberry Pi for the change to take effect.