ATSAMD21G15B-AF - 48MHz Cortex-M0+ MCU, 32KB Flash | Microchip
MPN: ATSAMD21G15B-AF β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.2 | $3.20 |
| 10 | $2.88 | $28.80 |
| 100 | $2.55 | $255.00 |
| 500 | $2.27 | $1,135.00 |
| 1,000 | $2.04 | $2,040.00 |
| 3,000 | $1.78 | $5,340.00 |
ATSAMD21G15B-AF Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, volatile and non-volatile memory, peripherals, and I/O into one package. The Cortex-M0+ is the smallest and most energy-efficient member of the ARM Cortex-M processor family, designed for deterministic real-time embedded applications. The SAM D21 series sits in the broader Microchip Atmel SMART portfolio, providing 32-bit performance with low-power SleepWalking peripherals, a 12-channel DMA controller, and a 12-channel Event System for inter-peripheral signalling without CPU intervention.
Key features include 32 KB Flash and 4 KB SRAM, up to 38 GPIO, six SERCOM interfaces that can be configured as UART, SPI, or I2C, a 12-bit 350 kSPS ADC with up to 14 channels, two 16-bit Timer/Counters and one 24-bit TC, an RTC, and a 10-channel 16-bit PWM. The device also provides a 12-bit DAC, a touch controller (PTC), and a Full-Speed USB 2.0 device with embedded PHY. The integrated DFLL48M and a 96 MHz Fractional Digital Phase-Locked Loop allow precise baud-rate generation and audio-clock synthesis.
Architecturally, the SAM D21G uses a single-cycle hardware multiplier, a single 32-bit bus matrix, and a Nested Vector Interrupt Controller (NVIC) for deterministic interrupt latency. Peripherals are clock-gated via the Power Manager and routed through the Event System to keep the CPU in sleep until needed. This combination delivers benchmark energy efficiency (CoreMark/mA) substantially better than 8-bit/16-bit MCUs while preserving the simplicity expected from an M0+ core.
Typical applications include USB Human Interface Devices (HID), consumer wearables, low-cost sensor hubs, battery-powered IoT nodes, industrial control panels, and home appliances. The combination of USB, ample analog, and low-power sleep modes (IDLE, STANDBY, BACKUP) makes it well-suited to mains- or battery-powered products where BOM cost is critical.
Designers should note that the SAM D21G is pin-compatible with the SAM D20G family, allowing upgrades from M0+ to higher Flash/RAM SKUs without PCB changes. The internal 1 V LDO requires a 1 Β΅F + 100 nF decoupling network on VDDIN, and VDDCORE requires a 1 Β΅F + 100 nF bulk. Unused pins should be left floating or pulled to a defined state to avoid leakage.
This page synthesizes distributor stock, drop-in alternatives, and practical design notes not always present in the manufacturer datasheet. Sources include DigiKey, Mouser, Microchip's product page, and the SAM D21/DA1 family datasheet, as of 2026-09-21.
Drop-in alternatives for ATSAMD21G15B-AF β same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Variants in this series
Same-series models that are drop-in compatible with ATSAMD21G15B-AF (same form factor and footprint) β differing in ADC, DAC, Package, RoHS Status, Debug Interface.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
ATSAMD21G16B-AF
β Drop-Inπ Reference alternative (not in catalog)
ATSAMD21G17B-AF
β Drop-Inπ Reference alternative (not in catalog)
ATSAMD21G18B-AF
β Drop-Inπ Reference alternative (not in catalog)
ATSAMD21G15B-AU
β Drop-Inβ In Stock
$1.65 / Unit
View Datasheet βATSAMD21G15B-AFT
β Drop-Inπ Reference alternative (not in catalog)
ATSAMD21G15B-AF Maximum Ratings & Electrical Characteristics
| Core | ARM Cortex-M0+ (32-bit) |
| Family | SAM D21G (Atmel SMART) |
| Maximum CPU Clock | 48 MHz |
| Program Memory (Flash) | 32 KB (32K x 8) |
| Data Memory (SRAM) | 4 KB |
| Operating Voltage (VDDIN) | 1.62 V to 3.63 V |
| Number of I/O Pins | 38 |
| Package | 48-TQFP (7x7 mm) |
| Operating Temperature | -40 Β°C to +125 Β°C |
| Communication Interfaces | 6x SERCOM (UART/SPI/I2C), USB 2.0 Full-Speed Device |
| ADC | 12-bit, up to 350 kSPS, up to 14 channels |
| DAC | 10-bit, 1 channel |
| Timers | Two 16-bit TC, one 24-bit TC, one RTC |
| PWM Channels | 10 (16-bit) |
| DMA | 12-channel DMAC |
| Mounting Type | Surface Mount |
| MSL Level | 3 (168 hours) |
| RoHS Status | Compliant |
ATSAMD21G15B-AF Pin Configuration
| Pin 1 | PA00 β General-purpose I/O / XIN32 |
| Pin 2 | PA01 β General-purpose I/O / XOUT32 |
| Pin 3 | PA02 β General-purpose I/O / AIN0 |
| Pin 4 | PA03 β General-purpose I/O / AIN1 / VREFA |
| Pin 5 | GND β Ground |
| Pin 6 | VDDIN β Voltage regulator input (1.62-3.63 V) |
| Pin 7 | VDDOUT β Voltage regulator output (1.2 V core) |
| Pin 8 | PA04 β General-purpose I/O / AIN2 |
| Pin 9 | PA05 β General-purpose I/O / AIN3 |
| Pin 10 | PA06 β General-purpose I/O |
| Pin 11 | PA07 β General-purpose I/O |
| Pin 12 | VDDCORE β Core voltage decoupling |
| Pin 13 | PA08 β General-purpose I/O / NMI |
| Pin 14 | PA09 β General-purpose I/O |
| Pin 15 | PA10 β General-purpose I/O |
| Pin 16 | PA11 β General-purpose I/O |
| Pin 17 | PA12 β General-purpose I/O |
| Pin 18 | PA13 β General-purpose I/O |
| Pin 19 | PA14 β General-purpose I/O |
| Pin 20 | PA15 β General-purpose I/O |
| Pin 21 | PA16 β General-purpose I/O |
| Pin 22 | PA17 β General-purpose I/O |
| Pin 23 | PA18 β General-purpose I/O |
| Pin 24 | PA19 β General-purpose I/O |
| Pin 25 | PA20 β General-purpose I/O |
| Pin 26 | PA21 β General-purpose I/O |
| Pin 27 | PA22 β General-purpose I/O |
| Pin 28 | PA23 β General-purpose I/O / USB SOF |
| Pin 29 | PA24 β General-purpose I/O / USB_DM |
| Pin 30 | PA25 β General-purpose I/O / USB_DP |
| Pin 31 | GND β Ground |
| Pin 32 | VDDIO β I/O voltage supply |
| Pin 33 | PA26 β General-purpose I/O |
| Pin 34 | PA27 β General-purpose I/O |
| Pin 35 | PA28 β General-purpose I/O |
| Pin 36 | PA29 β General-purpose I/O |
| Pin 37 | PA30 β General-purpose I/O / SWCLK |
| Pin 38 | PA31 β General-purpose I/O / SWDIO |
| Pin 39 | PB00 β General-purpose I/O |
| Pin 40 | PB01 β General-purpose I/O |
| Pin 41 | PB02 β General-purpose I/O / AIN10 |
| Pin 42 | PB03 β General-purpose I/O / AIN11 |
| Pin 43 | PB04 β General-purpose I/O / AIN12 |
| Pin 44 | PB05 β General-purpose I/O / AIN13 |
| Pin 45 | PB06 β General-purpose I/O |
| Pin 46 | PB07 β General-purpose I/O |
| Pin 47 | PB08 β General-purpose I/O |
| Pin 48 | PB09 β General-purpose I/O |
Typical Applications
ATSAMD21G15B-AF is suitable for 7 applications: USB HID Devices (Keyboards, Mice, Custom Input), Wearable Fitness Bands and Health Sensors, Industrial Sensor Hubs and PLC I/O Modules, Home Appliance Control Boards, Battery-Powered IoT Edge Nodes, Smart Home Gateway Accessories, Automotive Interior Lighting and HMI.
USB HID Devices (Keyboards, Mice, Custom Input)
The ATSAMD21G15B-AF is a strong fit for USB HID products. Its integrated USB 2.0 Full-Speed device peripheral with on-chip PHY eliminates external USB transceivers, while 32 KB Flash and 4 KB SRAM easily host the LUFA or Microchip USB stack plus HID report descriptors. At 48 MHz the Cortex-M0+ has ample headroom for keyboard matrix scanning, debounce logic, and LED animation. The 1.62-3.63 V supply range supports bus-powered designs. Compared with 8-bit MCUs, the M0+ core delivers 3-4x CoreMark/mA and simplifies USB stack porting.
Recommended
Wearable Fitness Bands and Health Sensors
In wearables, the ATSAMD21G15B-AF's SleepWalking peripherals and Event System let I2C sensors wake the CPU only on relevant data, preserving battery life. The 12-bit 350 kSPS ADC and 14 input channels support multi-sensor front-ends (heart rate, SpO2, temperature), while 4 KB SRAM is sufficient for short FIFO buffers and step-count algorithms. The 1.62 V minimum supply allows direct coin-cell operation. Per the SAM D21 family datasheet, BACKUP mode drops current to under 1 Β΅A, suitable for always-on wearables shipped with primary batteries rated for 6+ months.
Recommended
Industrial Sensor Hubs and PLC I/O Modules
The ATSAMD21G15B-AF suits industrial sensor hubs thanks to its 125 Β°C maximum junction temperature and 38 GPIO that can drive multiple 4-20 mA loops, opto-isolators, and relay coils. The 12-channel Event System routes GPIO and timer events without CPU intervention, freeing the M0+ core for diagnostics and Modbus RTU. The 6 SERCOM interfaces provide UART for fieldbus, SPI for ADC/DAC, and I2C for EEPROM and RTC. Robust ESD and the 7x7 mm TQFP package fit standard 25 mm DIN-rail carrier layouts.
Recommended
Home Appliance Control Boards
For consumer white goods and HVAC control boards, the ATSAMD21G15B-AF balances cost and capability. The 6 SERCOM and 10 PWM channels drive BLDC motors for fans and compressors, while the 12-bit ADC reads thermistor inputs and current-sensing shunts. The TQFP-48 footprint is well-established in hand-solder-friendly 0.5 mm pitch, simplifying factory rework. The Cortex-M0+ supports FreeRTOS for multi-tasking UI, motor control, and safety, with 4 KB SRAM running typical small RTOS workloads at idle.
Recommended
Battery-Powered IoT Edge Nodes
Battery-powered IoT edge nodes benefit from the ATSAMD21G15B-AF's low-power modes (IDLE < 5 Β΅A/MHz, STANDBY < 2 Β΅A, BACKUP < 1 Β΅A) and Event System wake-on-peripheral capability. A typical node pairs an SPI LoRa or BLE module with I2C environmental sensors; the MCU wakes the radio only on sensor data ready, sleeping the rest of the time. 32 KB Flash hosts a LoRaWAN or BLE stack, and 4 KB SRAM holds short sensor frames. The 1.62 V minimum allows use with discharged Li-coin primaries down to 2.0 V.
Recommended
Smart Home Gateway Accessories
Smart-home gateways and accessories (Zigbee/BLE coordinators, edge AI sensor pre-processors) can use the ATSAMD21G15B-AF as a low-cost co-processor. The 48 MHz Cortex-M0+ runs the Zigbee host stack or BLE link layer, with USB device mode supplying the upstream link to the gateway host. The 12-bit ADC and 10-bit DAC provide analogue interfaces for legacy HVAC and security panels. The 38 GPIO allow matrix keypads, multi-color LED drivers, and PIR sensor inputs to coexist on a single 48-pin MCU.
Recommended
Automotive Interior Lighting and HMI
In non-safety automotive interior applications (ambient lighting, HVAC controls, infotainment keypads), the ATSAMD21G15B-AF provides ample compute for WS2812/APA102 LED chains via SPI DMA and capacitive touch via the Peripheral Touch Controller. Six SERCOM interfaces connect to CAN transceivers (via external UART), I2S audio codecs, and SPI displays. The 125 Β°C temperature rating tolerates cabin extremes. For ASIL-rated applications, design houses should pair this MCU with an automotive-grade companion or move to AEC-Q100-qualified SAM DA1 family parts.
Recommended
Recommended Products Summary
Engineering reference data for ATSAMD21G15B-AF β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | ATSAMD21G16B-AF | ATSAMD21G17B-AF | ATSAMD21G18B-AF |
|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 48-TQFP (7x7) | 48-TQFP (7x7) - same | 48-TQFP (7x7) - same | 48-TQFP (7x7) - same |
| Core | ARM Cortex-M0+ | ARM Cortex-M0+ | ARM Cortex-M0+ | ARM Cortex-M0+ |
| Max CPU Clock | 48 MHz | 48 MHz | 48 MHz | 48 MHz |
| Flash | 32 KB | 64 KB | 128 KB | 256 KB |
| SRAM | 4 KB | 8 KB | 16 KB | 32 KB |
| USB | Full-Speed Device + PHY | Full-Speed Device + PHY | Full-Speed Device + PHY | Full-Speed Device + PHY |
| Operating Voltage | 1.62 V - 3.63 V | 1.62 V - 3.63 V | 1.62 V - 3.63 V | 1.62 V - 3.63 V |
| GPIO Count | 38 | 38 | 38 | 38 |
| Approx. 1k Price (USD) | $2.04 | ~$2.30 | ~$2.70 | ~$3.10 |
Key Differentiators
- Smallest Flash variant in SAM D21G TQFP-48 family - lowest cost for size-limited designs (vs ATSAMD21G18B-AF)
- Full-Speed USB with on-chip PHY vs SAM D20 parts lacking USB (vs ATSAMD20G18A-AU)
- 32-bit ARM Cortex-M0+ vs 8-bit PIC16 baseline (vs PIC16F720-I/P)
Design Notes
Place 1 Β΅F + 100 nF decoupling on both VDDIN and VDDCORE as close to the respective pins as possible; VDDOUT requires 1 Β΅F + 100 nF and feeds the internal 1.2 V LDO. Add bulk capacitance (4.7-10 Β΅F) at the input supply if the upstream regulator is shared with high-current loads. Estimated: with 1 Β΅F on VDDCORE and a worst-case 50 mA transient, ripple stays within Β±50 mV at the 48 MHz clock edge rate.
Route the USB D-/D+ pair as a 90 Ξ© differential with matched length and continuous reference plane on an adjacent ground pour. Keep the 1.5 kΞ© pull-up on D+ close to the DP pin and tied to VDDIO. Place the 12 MHz crystal within 5 mm of the XIN/XOUT pads with a guard ground ring. The SWD header (SWCLK/SWDIO) should be brought out to a 0.1" header for programming and field firmware updates.
Avoid leaving unused GPIO floating; configure them as output low or input with internal pull to prevent leakage in low-power modes. The ATSAMD21G15B-AF shares the USB DP/DM with PA24/PA25, so USB usage precludes those pins for GPIO. The brown-out detector (BOD) defaults to a threshold near 1.6 V; tune BODVDD via the NVM USER row if your application requires a higher reset threshold. The 32 KB Flash must be programmed with the appropriate BOOTPROT setting if secure boot is desired.
At 48 MHz clock and 3.63 V supply with all peripherals active, core current consumption reaches approximately 9 mA (estimated: 0.17 mA/MHz per the SAM D21 datasheet). For continuous 9 mA at 3.6 V, dissipation is roughly 32 mW - well within the TQFP-48 thermal envelope of approximately 70 Β°C/W junction-to-ambient, so no heatsink is required. However, in sealed enclosures above +85 Β°C ambient, derate the clock frequency or enable idle sleep modes to keep Tj under 125 Β°C.
Compliance Information
RoHS and lead-free per Microchip product page. Not AEC-Q100 qualified - migrate to SAM DA1 family (Functional Safety variant) for ASIL-rated applications. Industrial temperature range -40 to +125 Β°C is supported.