5 releases (breaking)

0.5.0 Aug 18, 2021
0.4.0 Jul 7, 2021
0.3.0 Jun 9, 2021
0.2.1 Jun 2, 2021
0.1.0 May 26, 2021

#1618 in Embedded development

MIT license

140KB
2K SLoC

KEA-HAL

docs.rs crates.io crates.io

A Hardware Abstraction Layer (HAL) implementing embedded-hal traits for the NXP KEA64 (SKEAZN642) family of MCUs. This HAL depends upon the SKEAZN642 Peripheral Access Crate. The intent is to expand this HAL to cover all MCUs in the KEA family

Status

This project is under development. If it doesn't work, then it's probably not fully implemented. Pull requests welcome. This is a side project, expect delays in response.

Compatibility

This crate was developed against a S9KEAZN32AMLH on a FRDM-KEAZ32Q64 dev board. It should be compatible with all parts in the KEA family. Differences within the family should be reconciled with feature flags (e.g. No onboard EEPROM).

Outside of the KEA family, NXP née Freescale, keeps a fairly consistent interface to their peripherals. At the briefest glance, the S32K11x and the KE06 look like they would be well supported by this crate.

KEA64 Module Functional Categories

This is how NXP grouped the peripheral modules in this sub-family of devices. The crate won't necessarily follow this layout, as it makes more sense to be as similar and idiomatic as is reasonable to other HAL crates. This is left in NXP's order largely to understand their resoning. This hierarchy will be deleted or modified to match implementation once this HAL is in a production-ready state. A checkmark will placed next to modules or peripherals once they are (mostly) implemented.

  • Core - The ARMv6 Cortex-M core (see cortex-m)
    • NVIC - Nested Vectored Interrupt Controller
    • AWIC - Asynchronous Wakeup Interrupt Controller
    • IOPORT - Single Cycle I/O. Used by Fast GPIO (FGPIO) module
    • SWD - Single Wire Debug
  • System
    • SIM - system integration module
    • PMC - Power management and mode controller
    • MCM - Misc. control module
    • BME - Bit manipulation engine. Atomic Read/Modify/Write operations
    • AIPS - Peripheral bridge. Interfaces ARM AHB with Peripherals
    • WDOG - Watchdog
  • Memory - Flash, EEPROM, SRAM. FTMRH peripheral used for interaction
  • Clocks
    • OSC
      • External Crystal Oscillator / Resonator
      • External Clock
    • ICS - Interal Clock Reference. 31.25 - 39.0625kHz Oscillator
    • LPO - 1kHZ Low Power Oscillator
    • Frequency-Locked Loop
  • Security
    • WDOG - Watchdog with independent clock source
    • CRC module (error detection)
  • Analog
    • ADC - 12 bit, 16 channels
    • 2x ACMP - Analog comparators
    • DAC - 6-bit (64-tap) resistor ladder network.
  • Timers
    • FTM
      • One 6-channel FlexTimer, full featured
      • Two 2-channel FlexTimer, basic TPM function
    • 2x PIT - Periodic Interrupt Timer
    • RTC - real time clock
    • SysTick - System Tick Timer
  • Communications
    • 2x SPI - 8 bit serial peripheral interfaces
    • I2C - Inter-integrated circuit
    • 3x UART (up to, some devices may have less)
  • HMI
    • GPIO
    • 2x KBI - Key board interrupt
    • IRQ - Interrupts

Dependencies

~4MB
~103K SLoC