Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Nordic Nrf Rust Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-nordic-nrf-rust-knowledge-patch-nevaberry-plugins)
---
name: nordic-nrf-rust-knowledge-patch
description: Nordic nRF (Rust)
version: "0.20.0"
license: MIT
metadata:
author: Nevaberry
---
# Nordic nRF Rust HAL compatibility
Use this skill when migrating Nordic nRF Rust HAL code, selecting trait
dependencies, or working with chip-specific peripheral APIs.
Load the topic reference for the operation being changed.
## Reference index
| Reference | Topics |
| --- | --- |
| [Compatibility and traits](references/compatibility-and-traits.md) | Dependency versions, legacy traits, formatting, compilation targets, PAC imports, sealed traits |
| [GPIO and pin ownership](references/gpio-and-pin-ownership.md) | Startup modes, pin-select encodings, open-drain I/O, drive strength, QDEC pin modes, PWM and USART pin ownership |
| [Serial buses and DMA](references/serial-buses-and-dma.md) | SPI migration and clock pins, TWIM buffers and errors, TWIS and SPIS |
| [Radio, USB, and flash](references/radio-usb-and-flash.md) | IEEE 802.15.4 receive and transmit behavior, USB dependencies, NVMC multiwrite support |
| [Devices and timing](references/devices-and-timing.md) | Chip and core support, peripheral availability, ADC inputs, comparators, RTIC clocks, RTC migration, PPI endpoints |
## Breaking changes and migration
### PAC imports
The HAL removed the PAC re-export under `target` in 0.11.0.
Migrate imports that used that alias to the device PAC.
### GPIO startup state
Starting in 0.12.0, GPIOs begin in the `Disconnected` state.
An explicit mode conversion is needed before use.
### SPI reads
In 0.12.0, replace `Spi::read` with `transfer_split_uneven`.
See [serial buses and DMA](references/serial-buses-and-dma.md) for clock-pin
and transfer-buffer guidance.
### PWM output pin ownership
From 0.13.0, pass the pin by value to `Pwm::set_output_pin`.
Use `swap_output_pin` or `clear_output_pin` to change the channel's pin
assignment later.
### RTC types
The RTC API drops typestate in 0.12.0.
Remove RTC state parameters from driver types when migrating earlier code.
### Peripheral and PPI implementations
The 0.12.0 HAL seals the peripheral `Instance` and PPI traits, reserving
implementations for HAL-provided types.
`ConfigurablePpi` extends `Ppi`.
### Compilation targets
From 0.12.0, these HALs reject the following targets:
| HAL | Rejected targets |
| --- | --- |
| nRF52 and newer HALs | Thumbv6-M |
| `nrf52810-hal` | Hard-float targets |
| `nrf51-hal` | Thumbv7 and newer targets |
### TWIM transfer handling
Starting in 0.12.0, callers must split oversized transfers themselves.
From 0.15.1, TWIM reports overruns separately from target rejection.
Match `DataNack` for target rejection and handle overruns separately.
### IEEE 802.15.4 receive and transmit state
From 0.12.2, `ieee802154::Radio::start_recv` is unsafe.
`Radio::recv_timeout` writes incoming data into the caller's `packet` buffer.
From 0.14.0, a completed transmission leaves the radio disabled.
Start the next operation from that state.
## Trait and dependency selection
### Embedded-hal compatibility
The 0.17.0 HAL adds `embedded-hal` 1.0 implementations and retains 0.2
implementations behind `embedded-hal-02`.
From 0.17.1, both `Twi` and `Twim` implement the 1.0
`embedded_hal::i2c::I2c` trait.
```toml
[dependencies]
nrf9160-hal = { version = "0.17.1", features = ["embedded-hal-02"] }
```
### UARTE legacy serial traits
UARTE implements `embedded_hal::serial` starting in 0.14.0.
These are the legacy 0.2 serial traits; enable `embedded-hal-02` when relying
on them with the 0.17 HAL.
### Embedded I/O and USB dependencies
The 0.19.0 HAL uses `embedded-io` 0.7.1.
Use the 0.7 series in application dependencies that call the HAL through
those traits.
The 0.18.0 HAL updates `nrf-usbd` to 0.3.0.
Align direct `nrf-usbd` dependencies with that version when integrating with
the HAL.
### Optional formatting
All chip HAL crates expose an optional `defmt` feature as of 0.19.0.
That release adds formatting support for types in `ieee802154`.
## Peripheral features
### RTIC monotonic clocks
Starting in 0.18.0, enable `rtic-monotonic` to use the RTC and TIMER
implementations of RTIC's `Monotonic` trait.
```toml
[dependencies]
nrf9160-hal = { version = "0.18", features = ["rtic-monotonic"] }
```
### GPIO pin selection and open-drain I/O
From 0.12.1, `Pin::psel_bits` and `Pin::from_psel_bits` convert between HAL
pins and peripheral pin-select encodings.
Use `OpenDrainIO`, added in 0.16.0, for an open-drain line the firmware must
also read. GPIO output drive strength is configurable from 0.16.1.
### QDEC input pin modes
In 0.20.0, QDEC is generic over the modes of its input pins.
Code that explicitly names the QDEC pin types can express those modes in the
type signature.
### Optional SPI clock pin
From 0.16.0, both `Spi` and `Spim` accept an omitted SCK pin.
The legacy SPI peripheral is available on all nRF52 chips from 0.13.0.
### USART pin recovery
Starting in 0.12.0, `Usart::free()` returns the owned `Pins` along with the
peripheral, allowing the pins to be reused.
### Flash multiwrite support
The NVMC driver is available from 0.13.0.
It implements `embedded_storage::nor_flash::MultiwriteNorFlash` on supported
nRF52 targets from 0.15.0 and on nRF9160 from 0.15.1.
### Hardware-triggered group and timer operations
In 0.12.0, PPI gains task endpoints for channel groups as well as endpoints
for timers, enabling hardware-triggered group control and timer operations.
For chip and core support, peripheral availability, and internal ADC inputs,
see [devices and timing](references/devices-and-timing.md).