1. Architecture and failure modes
Networks of 100 to 300+ nodes on Zigbee2MQTT and Home Assistant ZHA hit scaling ceilings in legacy TI Z-Stack firmware. As measured in the Part 1 whitepaper, the 100–200 device wall comes from O(N) flash scans and linear table walks in firmware rather than 2.4 GHz airtime or Cortex-M4 CPU limits.
Core engineering pillars in ZeroStack v1.0.0
Section titled “Core engineering pillars in ZeroStack v1.0.0”| Subsystem | ZeroStack change | Measured on CC1352P7 at 48 MHz |
|---|---|---|
| O(1) security and key lookup | Replaces the O(N⋅P) linear flash log scan on every frame. | 134.4× faster NWK encrypt (82.7 µs vs. 11.11 ms at D=150, 0 flash reads); 4,559× faster TCLK lookup. |
| Idempotent NVRAM writes | Skips flash writes when the record payload is unchanged. | 26.7× faster unchanged writes (78.5 µs, 0 B written); first compaction moves from write #69 to #1,013 (14.7×). |
| Power-fail-safe compaction | Atomic compaction and torn-record recovery. | 0 lost records across 22,959 power cuts and 2,000,000 shadow-fuzz ops; 749× lower post-brownout flash I/O. |
| Pre-crypto OTA frame validation | Rejects malformed secured NWK/APS frames before invoking crypto. | 0 crashes across 12 fault classes and 3,255 MAC vectors; 92.8× faster 1,000-frame replay rejection. |
| DMA-driven UART framing | Host serial path resynchronizes at wire speed. | 0 lost pings across 6 hostile-framing scenarios (vs. 8.84 s blackout); 83% fewer SYS_PING reply cycles. |
| Broadcast storm suppression | Larger Broadcast Transaction Table and cheaper duplicate suppression. | 19.9× lower total CPU in 50-router storm (151.16 ms vs. 3.00 s); +33% BTT slots (40 vs. 30). |
| O(1) allocator and timers | Constant-time allocation and heap-independent timers. | 11.7× faster malloc at 64 holes (4.5 µs); 6.9× faster timer start with Δheap 0 B. |
| Per-child indirect queue quotas | Per-child and global caps on indirect buffers. | No 0x11: BUFFER_FULL exhaustion from offline sensors; O(1) security (82.7 µs) meets poll windows. |
| Per-SoC RAM and table sizing | RAM pools and routing tables sized per SMLIGHT silicon profile. | Scales across CC2652P (88 KB), CC2652P7 (144 KB), CC2674P10 (256 KB), EFR32MG24 (128 KB), and EFR32MG26 (512 KB). |
Why stock coordinator firmware fails on large meshes
Section titled “Why stock coordinator firmware fails on large meshes”1. O(N⋅P) flash security walks and SREQ/SRSP serial lockups
Section titled “1. O(N⋅P) flash security walks and SREQ/SRSP serial lockups”- Symptoms:
SRSP - AF - dataRequestExt after 6000ms,SRSP - SYS - ping after 6000ms,0xa7,0xad - Root cause: Stock TI Z-Stack performs a linear flash log scan for every secured frame and TCLK lookup, while blocking NVRAM compactions (every 69 writes) and NPI parser desynchronization stall the serial task with interrupts masked.
- Measured impact: At D=150, routed hop security caps at ~45 pkt/s, a 50-device join burst stalls the coordinator for 1.70 s, and UART noise or compaction triggers an 8.84 s serial blackout (44 lost pings) that trips Zigbee2MQTT’s 6,000 ms watchdog.
2. Variable-block heap fragmentation and table saturation
Section titled “2. Variable-block heap fragmentation and table saturation”- Symptoms:
0x10: MEM_ERROR,0x11: BUFFER_FULL,0xc7: NWK_TABLE_FULL,0xb2: APS_TABLE_FULL,0xcd: NWK_NO_ROUTE - Root cause: The stock first-fit heap walks fragmented free lists in O(N) time and allocates both timers and packet buffers from the same pool, while a 30-slot Broadcast Transaction Table overflows during router echo storms.
- Measured impact: Fragmented allocations slow to 2,550 cycles at 64 holes (209.0 µs per timer start at 39 timers), and a 50-router broadcast echo storm consumes 3.00 s of CPU before spilling into
0xcd: NWK_NO_ROUTE.
3. Remote over-the-air reset fault and replay-flood lockups
Section titled “3. Remote over-the-air reset fault and replay-flood lockups”- Symptoms:
SYS_RESET_IND,AREQ - SYS - resetInd - Root cause: Unauthenticated over-the-air NWK frames with truncated
AuxHeader, payload, or MIC fields reach upper-layer processing without pre-crypto bounds validation, and replayed frames are processed through the full security path. - Measured impact: Truncated secured frames trigger a deterministic CPU fault within ~3.0 ms (rebooting the coordinator), while a 1,000-frame replay flood freezes the CPU for 2.99 s.
4. Indirect queue starvation and sleepy poll timing misses
Section titled “4. Indirect queue starvation and sleepy poll timing misses”- Symptoms:
0xe9: MAC_NO_ACK(233),0xf0: MAC_TRANSACTION_EXPIRED(240),0xf1: MAC_TRANSACTION_OVERFLOW(241) - Root cause: The RF core sets Frame Pending (
FP=1) in the 192 µs hardware auto-ACK, but the main CPU must still dequeue, encrypt, and transmit the held packet before the sleepy child’s poll window closes—and unresponsive sensors can hoard the shared indirect buffer pool. - Measured impact: Multi-millisecond flash security scans (11.11 ms), TCLK misses (30.96 ms), or NV compactions cause indirect deliveries to expire past
macMaxFrameTotalWaitTime.
5. Sub-MAC state desynchronisation
Section titled “5. Sub-MAC state desynchronisation”- Symptoms:
0xe1: MAC_CHANNEL_ACCESS_FAILURE(225) - Root cause: After an Energy Detect scan or channel switch,
SwiPcommand-completion races can leave the backgroundCMD_IEEE_RXreceiver terminated while upper-MAC CSMA flags stay out of sync. - Measured impact: Subsequent CCA checks fail persistently with
0xe1until the radio pipeline is recovered.
Cross-silicon architecture
Section titled “Cross-silicon architecture”ZeroStack v1.0.0 runs one unified Zigbee 3.0 / PRO R23 upper stack, O(1) security engine, allocator, and host ZNP/MT + OpenThread RCP transport across both TI SimpleLink F2 and Silicon Labs Series 2 SMLIGHT adapters via a thin Platform Abstraction Layer (PAL). Every supported coordinator shares the same deterministic scheduling, queue bounds, and backup-restore behavior regardless of the underlying radio SoC.
TI SimpleLink F2 (SLZB-06 / SLZB-06P7 / SLZB-06P10 / SLZB-07P7 / SLZB-MR series)
Section titled “TI SimpleLink F2 (SLZB-06 / SLZB-06P7 / SLZB-06P10 / SLZB-07P7 / SLZB-MR series)”On TI SimpleLink F2 devices (CC2652P, CC2652P7, CC2674P10), the IEEE 802.15.4 MAC is split across two cores:
- Main application MCU (ARM Cortex-M4F or Cortex-M33 at 48 MHz): runs the Zigbee PRO R23 stack, memory manager, security engine, and serial RPC transport.
- Autonomous RF core (ARM Cortex-M0 Command and Packet Engine): handles the 192 µs auto-ACK turnaround, hardware pending-frame lookup, CSMA/CA backoff, and inline AES-128 via
RF_postCmd()/RF_scheduleCmd()andRFC_DBELL.
Three hardware-level failure modes follow from this dual-core split (full trace in the silicon note):
| Hazard | Stock behaviour | ZeroStack resolution |
|---|---|---|
| Command-completion SWI starvation | A preemptive abort or synth error races CMD_IEEE_RX_ACK completion while SwiP scheduling is disabled, stalling TX with 0xe1 or 0x11. |
Reconciles background CMD_IEEE_RX across foreground CSMA/TX aborts, Energy Detect scans, and synth transitions (0 crashes across 3,255 MAC vectors). |
| Nested critical sections | Interrupts stay masked across O(N) table walks and flash/radio calls, overrunning UART RX FIFOs and delaying RFC_CPE_0. |
O(1) allocator (218 cyc), heap-independent timers (1,448 cyc), and in-RAM security (3,968 cyc encrypt) bound interrupt latency. |
| Sleepy-device poll turnaround | Flash scans, compactions, and broadcast stalls miss macMaxFrameTotalWaitTime; offline children hoard indirect buffers. |
82.7 µs NWK encrypt (0 flash reads), idle-deferred compaction, and per-child plus global indirect queue quotas. |
Silicon Labs Series 2 — EFR32MG24 & EFR32MG26 (SLZB-06Mg24 / SLZB-06Mg26 / SLZB-07Mg24 / SLZB-07Mg26 / SLZB-MR4)
Section titled “Silicon Labs Series 2 — EFR32MG24 & EFR32MG26 (SLZB-06Mg24 / SLZB-06Mg26 / SLZB-07Mg24 / SLZB-07Mg26 / SLZB-MR4)”On Silicon Labs Series 2 adapters, ZeroStack pairs an ARM Cortex-M33F host MCU (78 MHz) with the EFR32 RAIL radio layer and DMA-backed serial transport:
- Expanded NV key & network storage: Replaces stock EmberZNet’s 12-key-slot ceiling with O(1) in-RAM key lookup and wear-leveled NV storage sized for large Zigbee2MQTT and ZHA networks.
- Unified ZNP/MT + OpenThread RCP: Exposes the same ZNP/MT host interface (
adapter: zstack/znp) as TI builds alongside Spinel OpenThread RCP mode, so existing Zigbee2MQTT and ZHA setups migrate from backup without driver changes or re-pairing (see supported devices).

