Releases: imxrt-rs/imxrt-hal
Release 0.4.4
Added calls to set pin muxing in the PWM driver. This fixes a regression in
the PWM driver that was introduced in the 0.4 HAL release.
0.4.2
The 0.4.2 imxrt-hal
release contains three new peripherals, and a fix for existing peripheral errors.
Added
- Basic support for the secure real time clock (SRTC) peripheral, which
continues to track time while the SNVS low-power domain remains powered. - Add ADC channels. The channels implement the
embedded-hal::adc::Oneshot
trait. - Preliminary support for the TRNG, with an implementation of embedded_hal's
rng::Read
trait. Includes support forrand_core::RngCore
behind the
optional"rand_core"
feature.
Fixed
- Ensure that I2C and SPI errors can only be created by the HAL crate, and not by end users.
0.4.1
0.4.0
The 0.4.0 release has some new features, along with various breaking changes for both the HAL and RAL. See the notes below for more information.
The release introduces the imxrt-iomuxc
crates, which provide a simpler interface for configuring processor pads. The imxrt-iomuxc
API is re-exported through the imxrt_hal::iomuxc
module. The changes below describe the breaking HAL changes, and suggest ways to migrate your HAL code.
RAL
- BREAKING The RAL's
"rtfm"
feature is changed to"rtic"
, reflecting the framework's
new name. Users who are relying on the"rtfm"
feature should now use the"rtic"
feature.
HAL
Added
steal()
the top-levelPeripherals
object. Thesteal()
method lets users use theimxrt_hal
as an RTIC device.- DMA
Memcpy
may support interrupt handling - A new interface for pad configuration, supported by the
imxrt-iomuxc
crate family. See the Changed
section for migration information.
Changed
-
BREAKING The pad configuration interface has simplified. Users will use the
interface exposed by theimxrt-iomuxc
crate family. This section describes how you might
update your 0.3 (and earlier) code for the new interface.-
Naming: the
IOMUXC
instance exposes pads with a new naming convention. Previously, member
accessed resembledlet peripherals = imxrt_hal::Peripherals::take().unwrap(); peripherals.iomuxc.gpio_ad_b1_02;
Now, IOMUXC member access resembles
peripherals.iomuxc.ad_b1.p02
Generally, remove the "
gpio_
" prefix, and replace the second underscore with member access and
a "p
" symbol. -
Pad Types: The interface simplifies the pad types, removing the alternate type state.
Usages resemblinguse imxrt_hal as hal; type MyPin = hal::iomuxc::gpio::GPIO_AD_B0_12<hal::iomuxc::Alt5>;
can be simply expressed as
type MyPin = hal::iomuxc::ad_b0::AD_B0_12;
Note the stuttering convention of
pad_group::pad_group_offset
to reference pad types. -
No alternate transition: there are no
altX()
methods. Usage resemblinglet mut uart = uarts.uart2.init( peripherals.iomuxc.gpio_ad_b1_02.alt2(), peripherals.iomuxc.gpio_ad_b1_03.alt2(), BAUD, ).unwrap()
should drop the
altX()
calls (after renaming the pads).let mut uart = uarts.uart2.init( peripherals.iomuxc.ad_b1.p02, peripherals.iomuxc.ad_b1.p03, BAUD, ).unwrap();
-
Type Tags: all custom type-level constants, like
imxrt_hal::uart::module::_1
are now
typenum
constants. There are no peripheral-specific constants. Usage resemblinguse imxrt_hal::uart; type MyTX = uart::Tx<uart::module::_3>;
should update to
use imxrt_hal::uart; use imxrt_hal::iomuxc; type MyTX = uart::Tx<iomuxc::consts::U3>;
-
GPIO: the new IOMUXC driver results in a simpler GPIO interface. There is now a single GPIO
type that wraps an IOMUXC pad. Any GPIO type, likeuse imxrt_hal as hal; type HardwareFlag = hal::gpio::GPIO1IO26<hal::gpio::GPIO1, hal::gpio::Output>;
should change to
type HardwareFlag = hal::gpio::GPIO<hal::iomuxc::ad_b1::AD_B1_10, hal::gpio::Output>;
The new GPIO types expose a no-return
toggle()
method, which shadows an embedded_hal
trait method. If you notice compilation issues surroundingtoggle()
, try removing
unwrap()
calls:led.toggle().unwrap() // Old led.toggle() // New
Or, qualify that the
ToggleableOutputPin
trait method should be called.
-
-
BREAKING The HAL's
"rtfm"
feature is changed to"rtic"
, reflecting the framework's
new name. Users who are relying on the"rtfm"
feature should now use the"rtic"
feature. -
BREAKING The
dma::{Config, ConfigBuilder}
types are gone. This affects thedma::Peripheral
interface. To configure interrupt on completion / half settings, usedma::Channel::set_interrupt_on_completion()
/dma::Channel::set_interrupt_on_half()
to perform the same configurations before suppling the
channel todma::Peripheral
.
0.3.1 imxrt-hal
Fixed
The StatefulOutputPin
implementation was reading from the wrong GPIO register. The interface would indicate that the GPIO was always low, even when it was driven high. The implementation now reads from the data register, which represents the driven GPIO value.
0.3.0
Added
uart::ReadError
implementsClone
,Debug
,PartialEq
, andEq
UART
peripherals may besplit()
intoTx
andRx
halvesUART
peripherals implement the blockingembedded_hal
traits- General purpose timers (GPT)
- Introducing the DMA module
- Peripheral-to-memory transfers, supporting both SPI and UART
- Memory-to-memory copies
- Statically-allocated linear and circular buffers
- Documentation
- Getting Started
- Contributing
- Rustdoc-checked code examples
Changed
imxrt_hal::pit::Unclocked::clock
now takes a&mut imxrt_hal::ccm::perclk::Configured
mutable reference, rather
than a value. Users need to add a&mut
qualifier to theclock()
argument, and qualify theConfigured
object asmut
to migrate their code. The object may now be shared between PIT and GPT clocking methods.