Driver crate for the PL011 UART peripheral

Clone this repo:
  1. 8a952e6 Prepare for 0.3.1 release by Imre Kis · 3 months ago main 0.3.1
  2. 2f3845a Prepare for 0.3.0 release by Imre Kis · 4 months ago 0.3.0
  3. a4af1bb Use safe MMIO methods from new version of safe-mmio. by Andrew Walbran · 4 months ago
  4. 4952aef Prepare for 0.2.0 release by Imre Kis · 4 months ago 0.2.0
  5. b73935f Derive common traits for LineConfig and Identification. by Andrew Walbran · 4 months ago

Arm PrimeCell UART (PL011) driver

Driver implementation for the PL011 UART peripheral.

The driver is designed to function regardless of whether a Memory Management Unit (MMU) is present. The primary role of the OwnedMmioPointer is to manage the lifetime of the peripheral, ensuring proper resource handling. In a system that includes an MMU, the peripheral's lifetime is dynamic because it is mapped into memory rather than having a fixed address. In a system without an MMU, the OwnedMmioPointer can be instantiated directly from the physical address of the register block, providing access to the peripheral without requiring memory mapping.

Implemented features

  • Enabling/disabling UART peripheral which includes configuring the data bit number, parity settings, stop bit count and baudrate
  • Checking various status flags
  • Non-blocking read/write functions
  • Handling UART errors
  • Reading UART identification structure
  • 98% unit test coverage
  • Setting FIFO level of RX/TX interrupts
  • Reading, masking and clearing interrupts
  • Implementing various traits
    • embedded_hal_nb::serial::{Write, Read} (optional, behind the embedded-hal-nb feature flag)
    • embedded_io::{Write, Read} (optional, behind the embedded-io feature flag)
    • core::fmt::Write

Feature flags

  • embedded-hal-nb: Adds implementations of embedded-hal-nb traits for the UART driver.
  • embedded-io: Adds implementations of embedded-io traits for the UART driver.

Future plans

  • Handling modem control and status signals
  • Adding peripheral testing

License

The project is MIT and Apache-2.0 dual licensed, see LICENSE-APACHE and LICENSE-MIT.

Maintainers

arm-pl011-uart is a trustedfirmware.org maintained project. All contributions are ultimately merged by the maintainers listed below.

Contributing

Please follow the directions of the Trusted Firmware Processes

Contributions are handled through review.trustedfirmware.org.

Reporting Security Issues

Please follow the directions of the Trusted Firmware Security Center


Copyright 2024 Arm Limited and/or its affiliates open-source-office@arm.com