rust-raspberrypi-OS-tutorials/05_uart0
2018-01-13 21:34:05 +01:00
..
gpio.h Initial commit 2018-01-04 18:24:49 +01:00
kernel8.img Fixed issue #3 2018-01-13 21:34:05 +01:00
link.ld Initial commit 2018-01-04 18:24:49 +01:00
main.c Fixed issue #3 2018-01-13 21:34:05 +01:00
Makefile Initial commit 2018-01-04 18:24:49 +01:00
mbox.c Initial commit 2018-01-04 18:24:49 +01:00
mbox.h Initial commit 2018-01-04 18:24:49 +01:00
OLVASSEL.md Initial commit 2018-01-04 18:24:49 +01:00
README.md Initial commit 2018-01-04 18:24:49 +01:00
start.S Initial commit 2018-01-04 18:24:49 +01:00
uart.c Fixed issue #2 2018-01-13 21:31:34 +01:00
uart.h Initial commit 2018-01-04 18:24:49 +01:00

Tutorial 05 - UART0, PL011

This tutorial does the same as tutorial 04, but it prints the serial number on UART0. As such, it can be used easily with qemu, like

$ qemu-system-aarch64 -M raspi3 -kernel kernel8.img -serial stdio
My serial number is: 0000000000000000

Uart.h, uart.c

Before we could use a rate divisor value, we must establish a valid clock rate for the PL011. It's done via mailboxes, with the same property channel we used earlier. Otherwise this interface is identical to the UART1 one.

Main

We query the board's serial number and then we display it on the serial console.