Atsamd
Target atsamd microcontrollers using Rust
Install / Use
/learn @atsamd-rs/AtsamdREADME
atsamd & atsame support for Rust
This repository holds various crates that support/enable working with Microchip (nee Atmel) samd11, samd21, samd51 and same5x based devices using Rust.
HAL - Hardware Abstraction Layer
The Hardware Abstraction Layer (HAL - ) crate encodes a type-safe layer over the raw PACs. This crate implements traits specified by the embedded-hal project, making it compatible with various drivers in the embedded Rust ecosystem. Cargo features are used to enable support for specific hardware variations and features. Online documentation for commonly-used feature sets is provided:
| Chip family | Documented features | |:------------|:-------------------------------------------------| | samd11c | samd11c dma defmt async undoc-features | | samd11d | samd11d dma defmt async undoc-features | | samd21g | samd21g usb dma defmt async undoc-features | | samd21j | samd21j usb dma defmt async undoc-features | | samd51g | samd51g usb sdmmc dma defmt async undoc-features | | samd51j | samd51j usb sdmmc dma defmt async undoc-features | | samd51n | samd51n usb sdmmc dma defmt async undoc-features | | samd51p | samd51p usb sdmmc dma defmt async undoc-features |
PAC and BSP - Peripheral Access Crate and Board Support Package
The Peripheral Access Crates (PACs) are automatically generated from Microchip SVD files, and provide low-level access to the peripherals specified by a device's SVD file.
Board Support Packages (BSPs) are provided for popular development boards, which rename pins to match silk screens or Arduino pin assignments, add helpers for initialization, and re-export the atsamd-hal crate. The BSPs included in atsamd-rs are separated in to two tiers: Tier 1 BSPs use the latest version of atsamd-hal, Tier 2 BSPs use a specific version of atsamd-hal that is not necessarily the latest.
| PAC docs | crates.io | Provided BSPs |
|:---------|:----------|:---------------|
| atsamd11c | | Bare atsamd11* |
| atsamd21e |
| Gemma M0, Serpente, Trinket M0, Neo Trinkey, NeoKey Trinkey, QT Py |
| atsamd21g |
| Arduino Nano 33 IOT, Circuit Playground Express, Feather M0*, ItsyBitsy M0, Metro M0*, MKR1000, MKR Vidor 4000, MKR ZERO, P1AM-100, SAMD21 Mini, SODAQ ONE, Wio Lite MG126, Wio Lite W600, Xiao M0 |
| atsamd21j |
| SODAQ SARA AFF |
| atsamd51g |
| ItsyBitsy M4, Trellis M4 |
| atsamd51j |
| EdgeBadge, Feather M4*, Metro M4*, PyGamer*, PyPortal, Matrix Portal M4 |
| atsame51n |
| |
| atsamd51p |
| Grand Central M4 Express, Wio Terminal |
| atsame51g |
| |
| atsame51j |
| |
| atsame51n |
| |
| atsame53j |
| |
| atsame53n |
| |
| atsame54n |
| |
| atsame54p |
| PathfinderZA Proto1, SAM E54 Xplained Pro Evaluation Kit* |
* Tier 1 BSP
async APIs
atsamd_hal provides APIs for using async/await constructs with some of its peripherals. To enable async support, use the async Cargo feature.
Detailed documentation is provided in the atsamd_hal::async_hal module. The metro_m4 and
feather_m0 feature complete examples showing how to use async APIs.
Please note that you must bring your own executor runtime such as embassy-executor or rtic to be able to
use
Related Skills
himalaya
338.7kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
coding-agent
338.7kDelegate coding tasks to Codex, Claude Code, or Pi agents via background process
