Not vendored in the repo (third-party copyright) β download from the vendor:
- MGM210L module β datasheet PDF Β· product family (Silicon Labs)
- Sensirion SHT40 β SHT4x datasheet Β· product page
Silicon Labs MGM210LA22JNF2 β Mighty Gecko wireless module, 18-pin.
- SoC: EFR32MG21A (ARM Cortex-M33 @ up to 80 MHz), 2.4 GHz radio.
- Protocols: Zigbee 3.0 / Thread / Bluetooth LE (this project uses Zigbee).
- Integrated PCB antenna β ready-to-use module, no external RF parts. Place it at the edge of the board and keep the antenna area clear of copper/ground (datasheet Β§7). Mount horizontally for access to all pins.
- Pinout used here (datasheet Table 6.1): VDD = pin 13, GND = pins 6 & 14, RESETn = pin 11 (internal pull-up, no external R needed). Leave DEC (pin 5, internal decouple) and DNC (pin 12) unconnected.
- IΒ²C to the SHT40 on PC00 (pin 7) = SCL and PC01 (pin 8) = SDA β adjacent pads for short routing, no series resistor (unlike PC02βPC05), and this keeps PA01βPA04 for SWD and PD00/PD01 free for an optional 32.768 kHz LFXO crystal.
The MG21 has only an on-die temperature sensor (measures silicon temp, not ambient). An external IΒ²C sensor is required for real room temperature β and an RH-capable part (SHT4x / Si7021) also gives relative humidity, which the firmware reads from the same transaction and exposes as a second HA entity.
| Part | Purpose | Notes |
|---|---|---|
| MGM210LA22JNF2 | MCU + radio | LGA module, needs a carrier/PCB |
| Sensirion SHT40 | Temp + humidity | IΒ²C addr 0x44 (SHT40-AD1B); Β±0.2 Β°C, Β±1.8 %RH; ~0.4 Β΅A idle |
| CR2032 holder | Power | ~220 mAh, high internal resistance |
| 4.7 kΞ© Γ2 | IΒ²C pull-ups | SDA + SCL to VDD |
| 10 Β΅F + 100 nF | Module decoupling | near module VDD (pin 13); bulk cap absorbs TX pulses |
| 100 nF | SHT40 decoupling | across SHT40 VDDβVSS, close to the sensor (per datasheet) |
| β | Antenna | none β integrated in the module |
CR2032
+3 V nominal
(+) βββββ¬βββββββββ¬βββββββββ¬ββββββββββββββββββΊ VDD (module, SHT40, pull-ups)
β β β
ββ§β10Β΅F ββ§β100nF (bulk + HF decoupling, placed close to module VDD β
β β the bulk cap sources the radio TX current pulse the
(β) βββββ΄βββββββββ΄βββ coin cell's high internal R cannot)
GND ββββββββββββββββββββΊ GND
No battery divider: the cell sits directly on VDD and firmware reads VDD through the IADC's internal AVDD/4 input (see Battery sensing below).
VDD
β
βββββββ΄ββββββ
4.7kΞ© 4.7kΞ© external pull-ups β the module GPIOs
β(SDA) β(SCL) cannot drive the open-drain bus alone
MGM210L β β SHT40 (Sensirion)
βββββββββββ β β ββββββββββββββ
β PC01 βββΌβββ΄ββββββββββββΌββββββββββββ€ SDA β β
β PC00 βββΌβββββββββββββββ΄ββββββββββββ€ SCL β β
β VDD βββΌβββββββββββββββββββββββββββ€ VDD βββ β
β β β ββ§β 100 nF (decouple AT the SHT40)
β GND βββΌβββββββββββββββββββββββββββ€ VSS βββ β
βββββββββββ ββββββββββββββ
PC00 (pin 7) = I2C0_SCL, PC01 (pin 8) = I2C0_SDA (matches
config/sl_i2cspm_sensor_config.h; adjacent module pads = short routing)
The SHT40 returns temperature AND humidity in one read (cmd 0xFD, ~8 ms).
MGM210L J-Link / debug probe
βββββββββββββββββ
β PA01/SWCLK ββββΌββ SWCLK
β PA02/SWDIO ββββΌββ SWDIO
β RESETn(11) ββββΌββ RESET
β VDD / GND ββββΌββ VDD / GND
βββββββββββββββββ (SWD carries both flashing and SEGGER RTT logs β
no separate SWO pin needed for `commander rtt`)
RF: none β the module has an integrated antenna (place module at board edge,
keep the antenna area clear of copper/ground).
The firmware measures the supply rail with the on-chip IADC: input
iadcPosInputAvdd samples AVDD Γ· 4 against the internal 1.21 V reference,
and app_read_battery_mv() scales it back to millivolts. That value feeds the ZCL
Power Configuration battery voltage/percentage attributes. Because the CR2032 is
wired straight to VDD, no divider, extra pin, or GPIO is required.
A coin cell has ~10β40 Ξ© internal resistance, so a full-power radio TX pulse sags the rail and can brown-out the MCU. To stay reliable for years:
- Cap TX power at 0β8 dBm (see
SL_..._RADIO_TX_POWERin the.slcp), not the module's +20 dBm max. - Keep the 10 Β΅F bulk + 100 nF decoupling close to VDD to source the pulse.
- Sleep in EM2 between the 5-min reads (Power Manager handles this); the sensor's own sleep current (~80 nA) lets it stay powered.
- Budget: ~1β3 Β΅A average sleep + a few ms of radio per 5 min β multi-year life, dominated by the CR2032's self-discharge, not the firmware.
SWD only: SWCLK, SWDIO, RESET, GND to a J-Link. Add the module's VCOM/RTT
pins if you want live commander rtt logs. Pull the segger_rtt / iostream_rtt
components from the .slcp for production builds to shave idle current.