{
  "family": "Core",
  "name": "ST.W5",
  "rev": "b",
  "tile_id": 8,
  "json_version": "0.39",
  "updated_at": "2026-06-19T00:00:00.000Z",
  "headline": "BLE-enabled 100MHz Cortex M33",
  "description": "The Core.W tile combines the powerful STM32WBA55 100-MHz 32-bit Cortex-M33 processor together with an integrated 2.4GHz antenna on double-size T48 (4.0 x 8.0 mm) SMD package.  The tile provides a user-configurable combination of: SW debug & bootloading; 1MB flash & 128KB SRAM; wireless communications (BLE 5.4, Thread, Matter, Zigbee, proprietary); two FM+ (1MHz) I2C ports; two SPI ports; one USART; five 12-bit 2.5Msps ADC inputs (16-bit with oversampling); many timers; ten capacitive touch inputs; one serial-audio interface; IR output; and an on-board LED",
  "application_notes": [
    {
      "sort": 0,
      "details": "The single-wire debug port is available on pads 13 (SWCLK) and 14 (SWDIO). While not absolutely required, it is often helpful to have the ability to hold pads 22 (NRST) low when connecting to the debugger. You can likely also use BOOT0 to help the debugger connect.",
      "heading": "Single-Wire Debug & Bootloading",
      "image_url": ""
    },
    {
      "sort": 1,
      "details": "For the best wireless performance, the antenna-end of the Tile (the end without any pads) should not have any copper traces or planes above or below it.",
      "heading": "Antenna Clearance",
      "image_url": ""
    },
    {
      "sort": 2,
      "details": "The onboard LED is connected to PB12 in an active-high configuration.",
      "heading": "LED",
      "image_url": ""
    }
  ],
  "package": {
    "pads": 16,
    "type": "T48",
    "size_x": 4000,
    "size_y": 8000,
    "size_z": 0
  },
  "power": [
    {
      "max": 3.6,
      "min": 1.8,
      "type": "system",
      "notes": "",
      "gnd_pad": [
        "1"
      ],
      "function": "",
      "direction": "input",
      "is_required": true,
      "max_current": "",
      "positive_pad": [
        "14"
      ]
    }
  ],
  "components": [
    {
      "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32wba55hg.html",
      "part": "STM32WBA55HGF6",
      "datasheet": "https://mosaic-component-datasheets.s3.eu-north-1.amazonaws.com/8/ST_Microelectronics-STM32WBA55.pdf",
      "manufacturer": "ST Microelectronics"
    }
  ],
  "pads": [
    {
      "pad": "1",
      "geometry": {
        "size_x": 1000,
        "size_y": 400,
        "center_x": -1500,
        "center_y": 1600
      },
      "functions": [
        {
          "note": "",
          "type": "power",
          "function": "GND",
          "direction": "input"
        }
      ]
    },
    {
      "pad": "2",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": 800
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A0",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 6,
          "note": "",
          "type": "digital",
          "function": "SPI3.CLK",
          "direction": "",
          "interface": "SPI3"
        },
        {
          "note": "",
          "type": "analog",
          "function": "ADC9",
          "direction": ""
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM1.2N",
          "direction": ""
        },
        {
          "af": 2,
          "note": "",
          "type": "timer",
          "function": "TIM3.3",
          "direction": ""
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "TIM3.ETR",
          "direction": ""
        },
        {
          "af": 0,
          "note": "",
          "type": "timer",
          "function": "LPTIM1.IN1",
          "direction": ""
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G2.IO2",
          "direction": ""
        }
      ]
    },
    {
      "pad": "3",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": 0
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A5",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 6,
          "note": "",
          "type": "digital",
          "function": "SPI3.CS",
          "direction": "",
          "interface": "SPI3"
        },
        {
          "note": "",
          "type": "analog",
          "function": "ADC4",
          "direction": ""
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM2.1",
          "direction": ""
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "LPTIM2.ETR",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "SAI1.D2",
          "direction": "",
          "interface": "SAI1"
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G1.IO4",
          "direction": ""
        }
      ]
    },
    {
      "pad": "4",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": -800
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A6",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 4,
          "note": "",
          "type": "digital",
          "function": "I2C3.CLK",
          "direction": "",
          "interface": "I2C3"
        },
        {
          "note": "",
          "type": "analog",
          "function": "ADC3",
          "direction": ""
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM2.4",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "SAI1.CK2",
          "direction": "",
          "interface": "SAI1"
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "SAI1.MCLK_A",
          "direction": "",
          "interface": "SAI1"
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G1.IO3",
          "direction": ""
        }
      ]
    },
    {
      "pad": "5",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": -1600
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A7",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 4,
          "note": "",
          "type": "digital",
          "function": "I2C3.DAT",
          "direction": "",
          "interface": "I2C3"
        },
        {
          "note": "",
          "type": "analog",
          "function": "ADC2",
          "direction": ""
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM2.3",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "SAI1.SCK_A",
          "direction": "",
          "interface": "SAI1"
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G1.IO2",
          "direction": ""
        }
      ]
    },
    {
      "pad": "6",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": -2400
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "B8",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 6,
          "note": "",
          "type": "digital",
          "function": "SPI3.MOSI",
          "direction": "",
          "interface": "SPI3"
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM1.1",
          "direction": ""
        },
        {
          "af": 2,
          "note": "",
          "type": "timer",
          "function": "TIM3.ETR",
          "direction": ""
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "TIM16.1N",
          "direction": ""
        },
        {
          "af": 0,
          "note": "",
          "type": "timer",
          "function": "LPTIM1.ETR",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "USART2.RX",
          "direction": "",
          "interface": "USART2"
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G2.IO4",
          "direction": ""
        }
      ]
    },
    {
      "pad": "7",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": -1600,
        "center_y": -3200
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "B9",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 6,
          "note": "",
          "type": "digital",
          "function": "SPI3.MISO",
          "direction": "",
          "interface": "SPI3"
        },
        {
          "note": "",
          "type": "analog",
          "function": "ADC10",
          "direction": ""
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM1.3N",
          "direction": ""
        },
        {
          "af": 2,
          "note": "",
          "type": "timer",
          "function": "TIM3.4",
          "direction": ""
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "TIM16.1",
          "direction": ""
        },
        {
          "af": 13,
          "note": "",
          "type": "timer",
          "function": "LPTIM2.IN1",
          "direction": ""
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G2.IO3",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "IR_OUT",
          "direction": ""
        }
      ]
    },
    {
      "pad": "8",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": -3200
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A12",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 5,
          "note": "",
          "type": "digital",
          "function": "SPI1.CS",
          "direction": "",
          "interface": "SPI1"
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM1.2",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "USART2.TX",
          "direction": "",
          "interface": "USART2"
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G3.IO4",
          "direction": ""
        }
      ]
    },
    {
      "pad": "9",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": -2400
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "B4",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 5,
          "note": "",
          "type": "digital",
          "function": "SPI1.CLK",
          "direction": "",
          "interface": "SPI1"
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM1.3",
          "direction": ""
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "TIM17.1",
          "direction": ""
        },
        {
          "af": 2,
          "note": "",
          "type": "timer",
          "function": "LPTIM2.IN2",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "USART2.RX",
          "direction": "",
          "interface": "USART2"
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "SAI1.MCLK_B",
          "direction": "",
          "interface": "SAI1"
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G3.IO1",
          "direction": ""
        }
      ]
    },
    {
      "pad": "10",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": -1600
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A15",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 4,
          "note": "",
          "type": "digital",
          "function": "I2C1.CLK",
          "direction": "",
          "interface": "I2C1"
        },
        {
          "af": 5,
          "note": "",
          "type": "digital",
          "function": "SPI1.MOSI",
          "direction": "",
          "interface": "SPI1"
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM1.ETR",
          "direction": ""
        },
        {
          "af": 2,
          "note": "",
          "type": "timer",
          "function": "LPTIM1.2",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "USART2.RTS_DE",
          "direction": "",
          "interface": "USART2"
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "TIM17.BKIN",
          "direction": "input"
        }
      ]
    },
    {
      "pad": "11",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": -800
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "B3",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 4,
          "note": "",
          "type": "digital",
          "function": "I2C1.DAT",
          "direction": "",
          "interface": "I2C1"
        },
        {
          "af": 5,
          "note": "",
          "type": "digital",
          "function": "SPI1.MISO",
          "direction": "",
          "interface": "SPI1"
        },
        {
          "af": 1,
          "note": "",
          "type": "timer",
          "function": "TIM1.4",
          "direction": ""
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "TIM17.1N",
          "direction": ""
        },
        {
          "af": 2,
          "note": "",
          "type": "timer",
          "function": "LPTIM1.IN2",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "USART2.CK",
          "direction": "",
          "interface": "USART2"
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G3.IO2",
          "direction": ""
        }
      ]
    },
    {
      "pad": "12",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": 0
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A13",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 0,
          "note": "",
          "type": "system",
          "function": "SWDIO",
          "direction": ""
        },
        {
          "af": 14,
          "note": "",
          "type": "timer",
          "function": "TIM17.BKIN",
          "direction": ""
        },
        {
          "af": 9,
          "note": "",
          "type": "other",
          "function": "G3.IO3",
          "direction": ""
        }
      ]
    },
    {
      "pad": "13",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": 800
      },
      "functions": [
        {
          "note": "",
          "type": "digital",
          "function": "A14",
          "direction": "bidirectional",
          "is_default": true
        },
        {
          "af": 0,
          "note": "",
          "type": "system",
          "function": "SWCLK",
          "direction": ""
        },
        {
          "af": 3,
          "note": "",
          "type": "digital",
          "function": "USART2.TX",
          "direction": "",
          "interface": "USART2"
        }
      ]
    },
    {
      "pad": "14",
      "geometry": {
        "size_x": 800,
        "size_y": 400,
        "center_x": 1600,
        "center_y": 1600
      },
      "functions": [
        {
          "note": "1.6-3.6V",
          "type": "power",
          "function": "V+",
          "direction": ""
        }
      ]
    },
    {
      "pad": "15",
      "geometry": {
        "size_x": 400,
        "size_y": 800,
        "center_x": 400,
        "center_y": 1600
      },
      "functions": [
        {
          "note": "",
          "type": "system",
          "function": "BOOT0",
          "direction": ""
        },
        {
          "note": "",
          "type": "digital",
          "function": "H3",
          "direction": "bidirectional"
        }
      ]
    },
    {
      "pad": "16",
      "geometry": {
        "size_x": 400,
        "size_y": 800,
        "center_x": -400,
        "center_y": 1600
      },
      "functions": [
        {
          "note": "",
          "type": "system",
          "function": "NRST",
          "direction": ""
        }
      ]
    }
  ],
  "interfaces": [
    {
      "name": "I2C1",
      "type": "I2C",
      "parameters": {
        "modes": [
          "master, slave"
        ],
        "addresses": [
          {
            "address": "programmable"
          }
        ],
        "kernel_clk_mhz": 16,
        "max_clock_speed": "1MHz"
      },
      "pad_assignments": [
        {
          "pad": "10",
          "role": "bus",
          "function": "I2C1.CLK",
          "is_required": true
        },
        {
          "pad": "11",
          "role": "bus",
          "function": "I2C1.DAT",
          "is_required": true
        }
      ],
      "mutually_exclusive": [
        "SPI1",
        "USART2"
      ]
    },
    {
      "name": "I2C3",
      "type": "I2C",
      "parameters": {
        "modes": [
          "master, slave"
        ],
        "addresses": [
          {
            "address": "programmable"
          }
        ],
        "kernel_clk_mhz": 16,
        "max_clock_speed": "1MHz"
      },
      "pad_assignments": [
        {
          "pad": "4",
          "role": "bus",
          "function": "I2C3.CLK",
          "is_required": true
        },
        {
          "pad": "5",
          "role": "bus",
          "function": "I2C3.DAT",
          "is_required": true
        }
      ],
      "mutually_exclusive": [
        "SAI1"
      ]
    },
    {
      "name": "SPI1",
      "type": "SPI",
      "modeKey": "wires",
      "parameters": {
        "modes": [
          "master, slave"
        ]
      },
      "modeDefault": "4wire",
      "pad_assignments": [
        {
          "pad": "8",
          "role": "other",
          "function": "SPI1.CS"
        },
        {
          "pad": "9",
          "role": "bus",
          "byMode": {
            "3wire": {
              "required": true
            },
            "4wire": {
              "required": true
            }
          },
          "function": "SPI1.CLK"
        },
        {
          "pad": "10",
          "role": "bus",
          "byMode": {
            "3wire": {
              "required": true
            },
            "4wire": {
              "required": true
            }
          },
          "function": "SPI1.MOSI"
        },
        {
          "pad": "11",
          "role": "bus",
          "byMode": {
            "4wire": {
              "required": true
            }
          },
          "function": "SPI1.MISO"
        }
      ],
      "mutually_exclusive": [
        "I2C1",
        "SAI1",
        "USART2"
      ]
    },
    {
      "name": "SPI3",
      "type": "SPI",
      "modeKey": "wires",
      "parameters": {
        "modes": [
          "master, slave"
        ]
      },
      "modeDefault": "4wire",
      "pad_assignments": [
        {
          "pad": "2",
          "role": "bus",
          "byMode": {
            "3wire": {
              "required": true
            },
            "4wire": {
              "required": true
            }
          },
          "function": "SPI3.CLK"
        },
        {
          "pad": "3",
          "role": "other",
          "function": "SPI3.CS"
        },
        {
          "pad": "6",
          "role": "bus",
          "byMode": {
            "3wire": {
              "required": true
            },
            "4wire": {
              "required": true
            }
          },
          "function": "SPI3.MOSI"
        },
        {
          "pad": "7",
          "role": "bus",
          "byMode": {
            "4wire": {
              "required": true
            }
          },
          "function": "SPI3.MISO"
        }
      ],
      "mutually_exclusive": [
        "SAI1"
      ]
    },
    {
      "name": "USART2",
      "type": "USART",
      "parameters": {
        "modes": []
      },
      "pad_assignments": [
        {
          "pad": "6",
          "role": "bus",
          "function": "USART2.RX"
        },
        {
          "pad": "8",
          "role": "bus",
          "function": "USART2.TX"
        },
        {
          "pad": "9",
          "role": "bus",
          "function": "USART2.RX"
        },
        {
          "pad": "10",
          "role": "bus",
          "function": "USART2.RTS_DE"
        },
        {
          "pad": "11",
          "role": "bus",
          "function": "USART2.CK"
        },
        {
          "pad": "13",
          "role": "bus",
          "function": "USART2.TX"
        }
      ],
      "mutually_exclusive": [
        "I2C1",
        "SPI1"
      ]
    },
    {
      "name": "SAI1",
      "type": "SAI",
      "modeKey": "protocol",
      "parameters": {
        "modes": []
      },
      "modeDefault": "i2s",
      "pad_assignments": [
        {
          "pad": "3",
          "role": "bus",
          "byMode": {
            "i2s": {
              "required": false
            },
            "pdm": {
              "required": true
            }
          },
          "function": "SAI1.D2"
        },
        {
          "pad": "4",
          "role": "bus",
          "byMode": {
            "i2s": {
              "required": true
            },
            "pdm": {
              "required": true
            }
          },
          "function": "SAI1.CK2"
        },
        {
          "pad": "4",
          "role": "bus",
          "byMode": {
            "i2s": {
              "required": false
            }
          },
          "function": "SAI1.MCLK_A"
        },
        {
          "pad": "5",
          "role": "bus",
          "byMode": {
            "i2s": {
              "required": true
            }
          },
          "function": "SAI1.SCK_A"
        },
        {
          "pad": "9",
          "role": "bus",
          "byMode": {
            "i2s": {
              "required": false
            }
          },
          "function": "SAI1.MCLK_B"
        }
      ],
      "mutually_exclusive": [
        "I2C3",
        "SPI1",
        "SPI3"
      ]
    }
  ],
  "twin": {
    "score": 1,
    "source": "// Digital twin for Core.ST.W5 (formerly Core.W) — the BLE MCU host board itself.\n//\n// A Core, not a peripheral: no tile driver, no host calls. The twin models the\n// board standards — STM32WBA55 power across run/sleep/stop/standby (LDO vs SMPS\n// regulator path), the BLE radio as a power state (the on-board Johanson 2450AT\n// chip antenna is RF-only, no pad), the on-board status LED, and the optional\n// I2C pull-ups.\n//\n// Power numbers: STM32WBA5xxx datasheet (DS14127 Rev 7, TYP @ 3.3 V / 25 °C),\n// MCU Tables 45/46/49/51/52/54 and BLE radio Table 37. Pad map per Core-W-b.json\n// (V+ pad 14, GND pad 1, I2C3 CLK/DAT pads 4/5).\nimport type { TileSim } from '../tileSim';\n\n// power_mode slider index → mode.\nconst MODES = ['run', 'sleep', 'stop0', 'stop1', 'standby'] as const;\n// sysclk slider index → MHz.\nconst CLOCKS = [16, 32, 100] as const;\n// ble_state slider index → activity.\nconst BLE = ['off', 'advertising', 'connected', 'tx', 'rx'] as const;\n\n// MCU core current (µA) by clock, per regulator path (LDO / SMPS).\nconst RUN_UA = { ldo: { 16: 910, 32: 2290, 100: 6160 }, smps: { 16: 450, 32: 1470, 100: 3350 } };\nconst SLEEP_UA = { ldo: { 16: 340, 32: 950, 100: 2140 }, smps: { 16: 220, 32: 820, 100: 1500 } };\n// Fixed low-power modes (µA) — SMPS path largely matches in deep stop/standby.\nconst FIXED_UA: Record<string, { ldo: number; smps: number }> = {\n  stop0: { ldo: 49, smps: 11 },\n  stop1: { ldo: 22.6, smps: 22.6 },\n  standby: { ldo: 0.37, smps: 0.37 },\n};\n// BLE radio adder (µA) on top of core current (Table 37, 0 dBm Tx / 1 Mbps Rx).\n// advertising/connected are duty-cycled averages (estimated — datasheet gives peaks only).\nconst RADIO_UA: Record<string, { ldo: number; smps: number }> = {\n  off: { ldo: 0, smps: 0 },\n  advertising: { ldo: 800, smps: 500 },\n  connected: { ldo: 1200, smps: 700 },\n  tx: { ldo: 10510, smps: 5540 },\n  rx: { ldo: 7910, smps: 5220 },\n};\n\nconst RAIL_MV = 3300;\nconst LED_R_OHM = 40; // R2 (schematic) — atypically low, see provenance\nconst LED_VF_MV = 1900;\n\ninterface State {\n  power_mode: number;\n  sysclk: number;\n  regulator: number; // 0 = LDO, 1 = SMPS\n  led_on: number; // on-board red LED (PB12, active-high)\n  ble_state: number;\n  i2c_pullups: number; // optional 2.2k pull-ups on I2C3 (pads 4/5)\n  [field: string]: number;\n}\n\nconst clamp = (v: number, lo: number, hi: number) => Math.max(lo, Math.min(hi, v));\nconst modeOf = (s: State) => MODES[clamp(s.power_mode, 0, MODES.length - 1)];\nconst clockOf = (s: State) => CLOCKS[clamp(s.sysclk, 0, CLOCKS.length - 1)];\nconst bleOf = (s: State) => BLE[clamp(s.ble_state, 0, BLE.length - 1)];\nconst regOf = (s: State): 'ldo' | 'smps' => (s.regulator ? 'smps' : 'ldo');\n\nconst ledUa = (s: State) =>\n  s.led_on && RAIL_MV > LED_VF_MV ? Math.round(((RAIL_MV - LED_VF_MV) / LED_R_OHM) * 1000) : 0;\n\nfunction coreUa(s: State): number {\n  const reg = regOf(s);\n  const mode = modeOf(s);\n  if (mode === 'run') return RUN_UA[reg][clockOf(s)];\n  if (mode === 'sleep') return SLEEP_UA[reg][clockOf(s)];\n  return FIXED_UA[mode][reg];\n}\n// Radio only runs when the MCU is awake (run/sleep); deep-sleep modes drop it.\nfunction radioUa(s: State): number {\n  const mode = modeOf(s);\n  if (mode !== 'run' && mode !== 'sleep') return 0;\n  return RADIO_UA[bleOf(s)][regOf(s)];\n}\n\nconst sim: TileSim<State> = {\n  tile: 'Core.ST.W5',\n\n  defaultState: {\n    power_mode: 0, // run\n    sysclk: 1, // 32 MHz\n    regulator: 1, // SMPS (default firmware path)\n    led_on: 0,\n    ble_state: 0, // off\n    i2c_pullups: 1,\n  },\n\n  controls: [\n    {\n      type: 'slider',\n      field: 'power_mode',\n      label: 'Mode (0 run·1 sleep·2 stop0·3 stop1·4 standby)',\n      min: 0,\n      max: 4,\n      step: 1,\n    },\n    {\n      type: 'slider',\n      field: 'sysclk',\n      label: 'Clock (0:16·1:32·2:100 MHz)',\n      min: 0,\n      max: 2,\n      step: 1,\n    },\n    { type: 'toggle', field: 'regulator', label: 'SMPS regulator (off = LDO)' },\n    {\n      type: 'slider',\n      field: 'ble_state',\n      label: 'BLE (0 off·1 adv·2 conn·3 tx·4 rx)',\n      min: 0,\n      max: 4,\n      step: 1,\n    },\n    { type: 'toggle', field: 'led_on', label: 'On-board LED (PB12)' },\n    { type: 'toggle', field: 'i2c_pullups', label: 'I2C3 pull-ups populated' },\n  ],\n\n  hostCalls: {},\n\n  provenance: {\n    power: 'inferred', // MCU + Tx/Rx currents canonical (DS14127); adv/connected averages + LED estimated\n  },\n\n  // Optional 2.2k pull-ups idle I2C3 (pads 4 CLK / 5 DAT) high. LED (PB12) and the\n  // antenna (RF matching network) are internal — neither is a numbered pad.\n  padOutputs(state) {\n    const up = state.i2c_pullups ? 1 : 0;\n    return { 'I2C3.CLK': up, 'I2C3.DAT': up };\n  },\n\n  // Supply draw on V+ (pad 14) / GND (pad 1): MCU-mode + BLE radio + LED.\n  power(state) {\n    const ua = coreUa(state) + radioUa(state) + ledUa(state);\n    const ble = bleOf(state);\n    return {\n      draw_ua: Math.round(ua * 1000) / 1000,\n      rails: [\n        {\n          name: 'V+',\n          role: 'supply',\n          v_mv: RAIL_MV,\n          i_ua: Math.round(ua * 1000) / 1000,\n          pads: ['14'],\n          note: `STM32WBA55 ${modeOf(state)}/${regOf(state)}${ble !== 'off' ? ' +BLE ' + ble : ''}${state.led_on ? ' +LED' : ''}`,\n        },\n      ],\n    };\n  },\n};\n\nexport default sim;\n",
    "status": "validated",
    "updated_at": "2026-06-22T12:44:21.678Z"
  },
  "config": {
    "gpio": {
      "kind": "padconfig",
      "group": "Pinmux",
      "label": "GPIO pad configuration",
      "perPad": {
        "fields": {
          "exti": {
            "kind": "select",
            "when": {
              "direction": "in"
            },
            "default": "none",
            "options": [
              {
                "value": "none"
              },
              {
                "value": "rising"
              },
              {
                "value": "falling"
              },
              {
                "value": "both"
              }
            ]
          },
          "pull": {
            "kind": "select",
            "default": "none",
            "options": [
              {
                "value": "none"
              },
              {
                "value": "up"
              },
              {
                "value": "down"
              }
            ]
          },
          "speed": {
            "kind": "select",
            "default": "medium",
            "options": [
              {
                "value": "low"
              },
              {
                "value": "medium"
              },
              {
                "value": "high"
              },
              {
                "value": "very-high"
              }
            ]
          },
          "direction": {
            "kind": "select",
            "default": "in",
            "options": [
              {
                "value": "in"
              },
              {
                "value": "out"
              }
            ]
          },
          "output_default": {
            "kind": "select",
            "when": {
              "direction": "out"
            },
            "default": "low",
            "options": [
              {
                "value": "low"
              },
              {
                "value": "high"
              }
            ]
          }
        }
      },
      "appliesTo": {
        "selector": "pads.<padNum>",
        "whereValueDerived": {
          "role": "gpio"
        }
      }
    },
    "pads": {
      "kind": "padmux",
      "group": "Pinmux",
      "label": "Pad function assignments",
      "perPad": {
        "2": {
          "label": "Pad 2",
          "default": "A0",
          "options": [
            {
              "value": "A0",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 6,
              "value": "SPI3.CLK",
              "interface": "SPI3"
            },
            {
              "value": "ADC9",
              "derived": {
                "role": "analog"
              }
            },
            {
              "af": 1,
              "value": "TIM1.2N",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 2,
              "value": "TIM3.3",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 14,
              "value": "TIM3.ETR",
              "derived": {
                "role": "timer-input"
              }
            },
            {
              "af": 0,
              "value": "LPTIM1.IN1",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 9,
              "value": "G2.IO2"
            }
          ]
        },
        "3": {
          "label": "Pad 3",
          "default": "A5",
          "options": [
            {
              "value": "A5",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 6,
              "value": "SPI3.CS",
              "interface": "SPI3"
            },
            {
              "value": "ADC4",
              "derived": {
                "role": "analog"
              }
            },
            {
              "af": 1,
              "value": "TIM2.1",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 14,
              "value": "LPTIM2.ETR",
              "derived": {
                "role": "timer-input"
              }
            },
            {
              "af": 3,
              "value": "SAI1.D2",
              "interface": "SAI1"
            },
            {
              "af": 9,
              "value": "G1.IO4"
            }
          ]
        },
        "4": {
          "label": "Pad 4",
          "default": "A6",
          "options": [
            {
              "value": "A6",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 4,
              "value": "I2C3.CLK",
              "interface": "I2C3"
            },
            {
              "value": "ADC3",
              "derived": {
                "role": "analog"
              }
            },
            {
              "af": 1,
              "value": "TIM2.4",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 3,
              "value": "SAI1.CK2",
              "interface": "SAI1"
            },
            {
              "af": 3,
              "value": "SAI1.MCLK_A",
              "interface": "SAI1"
            },
            {
              "af": 9,
              "value": "G1.IO3"
            }
          ]
        },
        "5": {
          "label": "Pad 5",
          "default": "A7",
          "options": [
            {
              "value": "A7",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 4,
              "value": "I2C3.DAT",
              "interface": "I2C3"
            },
            {
              "value": "ADC2",
              "derived": {
                "role": "analog"
              }
            },
            {
              "af": 1,
              "value": "TIM2.3",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 3,
              "value": "SAI1.SCK_A",
              "interface": "SAI1"
            },
            {
              "af": 9,
              "value": "G1.IO2"
            }
          ]
        },
        "6": {
          "label": "Pad 6",
          "default": "B8",
          "options": [
            {
              "value": "B8",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 6,
              "value": "SPI3.MOSI",
              "interface": "SPI3"
            },
            {
              "af": 1,
              "value": "TIM1.1",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 2,
              "value": "TIM3.ETR",
              "derived": {
                "role": "timer-input"
              }
            },
            {
              "af": 14,
              "value": "TIM16.1N",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 0,
              "value": "LPTIM1.ETR",
              "derived": {
                "role": "timer-input"
              }
            },
            {
              "af": 3,
              "value": "USART2.RX",
              "interface": "USART2"
            },
            {
              "af": 9,
              "value": "G2.IO4"
            }
          ]
        },
        "7": {
          "label": "Pad 7",
          "default": "B9",
          "options": [
            {
              "value": "B9",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 6,
              "value": "SPI3.MISO",
              "interface": "SPI3"
            },
            {
              "value": "ADC10",
              "derived": {
                "role": "analog"
              }
            },
            {
              "af": 1,
              "value": "TIM1.3N",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 2,
              "value": "TIM3.4",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 14,
              "value": "TIM16.1",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 13,
              "value": "LPTIM2.IN1",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 9,
              "value": "G2.IO3"
            },
            {
              "af": 3,
              "value": "IR_OUT",
              "derived": {
                "role": "gpio"
              }
            }
          ]
        },
        "8": {
          "label": "Pad 8",
          "default": "A12",
          "options": [
            {
              "value": "A12",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 5,
              "value": "SPI1.CS",
              "interface": "SPI1"
            },
            {
              "af": 1,
              "value": "TIM1.2",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 3,
              "value": "USART2.TX",
              "interface": "USART2"
            },
            {
              "af": 9,
              "value": "G3.IO4"
            }
          ]
        },
        "9": {
          "label": "Pad 9",
          "default": "B4",
          "options": [
            {
              "value": "B4",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 5,
              "value": "SPI1.CLK",
              "interface": "SPI1"
            },
            {
              "af": 1,
              "value": "TIM1.3",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 14,
              "value": "TIM17.1",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 2,
              "value": "LPTIM2.IN2",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 3,
              "value": "USART2.RX",
              "interface": "USART2"
            },
            {
              "af": 3,
              "value": "SAI1.MCLK_B",
              "interface": "SAI1"
            },
            {
              "af": 9,
              "value": "G3.IO1"
            }
          ]
        },
        "10": {
          "label": "Pad 10",
          "default": "A15",
          "options": [
            {
              "value": "A15",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 4,
              "value": "I2C1.CLK",
              "interface": "I2C1"
            },
            {
              "af": 5,
              "value": "SPI1.MOSI",
              "interface": "SPI1"
            },
            {
              "af": 1,
              "value": "TIM1.ETR",
              "derived": {
                "role": "timer-input"
              }
            },
            {
              "af": 2,
              "value": "LPTIM1.2",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 3,
              "value": "USART2.RTS_DE",
              "interface": "USART2"
            },
            {
              "af": 14,
              "value": "TIM17.BKIN",
              "derived": {
                "role": "timer-input"
              }
            }
          ]
        },
        "11": {
          "label": "Pad 11",
          "default": "B3",
          "options": [
            {
              "value": "B3",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 4,
              "value": "I2C1.DAT",
              "interface": "I2C1"
            },
            {
              "af": 5,
              "value": "SPI1.MISO",
              "interface": "SPI1"
            },
            {
              "af": 1,
              "value": "TIM1.4",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 14,
              "value": "TIM17.1N",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 2,
              "value": "LPTIM1.IN2",
              "derived": {
                "role": "timer-output"
              }
            },
            {
              "af": 3,
              "value": "USART2.CK",
              "interface": "USART2"
            },
            {
              "af": 9,
              "value": "G3.IO2"
            }
          ]
        },
        "12": {
          "label": "Pad 12",
          "default": "A13",
          "options": [
            {
              "value": "A13",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 0,
              "value": "SWDIO",
              "derived": {
                "role": "system"
              }
            },
            {
              "af": 14,
              "value": "TIM17.BKIN",
              "derived": {
                "role": "timer-input"
              }
            },
            {
              "af": 9,
              "value": "G3.IO3"
            }
          ]
        },
        "13": {
          "label": "Pad 13",
          "default": "A14",
          "options": [
            {
              "value": "A14",
              "derived": {
                "role": "gpio"
              }
            },
            {
              "af": 0,
              "value": "SWCLK",
              "derived": {
                "role": "system"
              }
            },
            {
              "af": 3,
              "value": "USART2.TX",
              "interface": "USART2"
            }
          ]
        },
        "15": {
          "label": "Pad 15",
          "default": "BOOT0",
          "options": [
            {
              "value": "BOOT0",
              "derived": {
                "role": "system"
              }
            },
            {
              "value": "H3",
              "derived": {
                "role": "gpio"
              }
            }
          ]
        }
      },
      "derives": "catalog.pads"
    },
    "clock": {
      "kind": "select",
      "group": "Clock",
      "label": "Clock configuration",
      "default": "medium",
      "options": [
        {
          "label": "Low (16MHz, HSI16)",
          "value": "low",
          "firmware_contract": [
            {
              "type": "clock",
              "source": "hsi16",
              "sysclk_mhz": 16
            }
          ]
        },
        {
          "label": "Medium (32MHz, HSE)",
          "value": "medium",
          "firmware_contract": [
            {
              "type": "clock",
              "source": "hse",
              "sysclk_mhz": 32
            }
          ]
        },
        {
          "label": "High (64MHz, HSE + PLL)",
          "value": "high",
          "firmware_contract": [
            {
              "pll": true,
              "type": "clock",
              "source": "hse",
              "sysclk_mhz": 64
            }
          ]
        },
        {
          "label": "Max (100MHz, HSE + PLL)",
          "value": "max",
          "firmware_contract": [
            {
              "pll": true,
              "type": "clock",
              "source": "hse",
              "sysclk_mhz": 100
            }
          ]
        }
      ]
    },
    "bootloader": {
      "kind": "multiselect",
      "group": "Bootloader",
      "label": "Programming methods",
      "default": [],
      "options": [
        {
          "value": "USART1"
        },
        {
          "value": "I2C3"
        },
        {
          "value": "SPI3"
        }
      ]
    },
    "interfaces": {
      "kind": "instances",
      "group": "Interfaces",
      "label": "Interfaces",
      "derives": "catalog.interfaces",
      "defaults": {
        "role": {
          "kind": "select",
          "when": {
            "enabled": true
          },
          "default": "master",
          "options": [
            {
              "value": "master"
            },
            {
              "value": "slave"
            }
          ]
        },
        "speed": {
          "max": 1000000,
          "min": 100000,
          "kind": "number",
          "unit": "Hz",
          "when": {
            "enabled": true
          },
          "default": 400000
        },
        "enabled": {
          "kind": "boolean",
          "default": false
        }
      },
      "perInstance": {
        "I2C1": {
          "fields": {
            "address": {
              "max": 119,
              "min": 8,
              "kind": "number",
              "unit": "7-bit",
              "when": {
                "role": "slave"
              },
              "default": 66
            }
          },
          "netlist": {
            "when": {
              "enabled": true
            },
            "buses": [
              {
                "bus": "i2c",
                "tag": "I2C1.bus",
                "signalsFrom": "interfaces.I2C1.pad_assignments"
              }
            ]
          },
          "requires": {
            "predicates": {
              "pads.10": "I2C1.CLK",
              "pads.11": "I2C1.DAT"
            }
          },
          "firmware_contract": {
            "entries": [
              {
                "via": "register",
                "type": "register",
                "value": 1,
                "register": "RCC.CLK_EN.I2C1"
              }
            ]
          }
        },
        "I2C3": {
          "fields": {
            "address": {
              "max": 119,
              "min": 8,
              "kind": "number",
              "unit": "7-bit",
              "when": {
                "role": "slave"
              },
              "default": 66
            }
          },
          "netlist": {
            "when": {
              "enabled": true
            },
            "buses": [
              {
                "bus": "i2c",
                "tag": "I2C3.bus",
                "signalsFrom": "interfaces.I2C3.pad_assignments"
              }
            ]
          },
          "requires": {
            "predicates": {
              "pads.4": "I2C3.CLK",
              "pads.5": "I2C3.DAT"
            }
          },
          "firmware_contract": {
            "entries": [
              {
                "via": "register",
                "type": "register",
                "value": 1,
                "register": "RCC.CLK_EN.I2C3"
              }
            ]
          }
        },
        "SAI1": {
          "fields": {
            "mclk": {
              "kind": "boolean",
              "when": {
                "protocol": "i2s"
              },
              "label": "Output MCLK",
              "default": false
            },
            "role": {
              "kind": "select",
              "when": {
                "enabled": true
              },
              "label": "Clocking",
              "default": "master",
              "options": [
                {
                  "label": "Master (drives BCLK/FS)",
                  "value": "master"
                },
                {
                  "label": "Slave (external BCLK/FS)",
                  "value": "slave"
                }
              ]
            },
            "dataSize": {
              "kind": "select",
              "when": {
                "protocol": "i2s"
              },
              "label": "Word length",
              "default": 24,
              "options": [
                {
                  "label": "16-bit",
                  "value": 16
                },
                {
                  "label": "24-bit",
                  "value": 24
                },
                {
                  "label": "32-bit",
                  "value": 32
                }
              ]
            },
            "pdmClock": {
              "kind": "select",
              "when": {
                "protocol": "pdm"
              },
              "label": "PDM clock",
              "default": 2400000,
              "options": [
                {
                  "label": "1.0 MHz (low power)",
                  "value": 1000000
                },
                {
                  "label": "2.4 MHz (normal)",
                  "value": 2400000
                },
                {
                  "label": "3.072 MHz",
                  "value": 3072000
                }
              ]
            },
            "protocol": {
              "kind": "select",
              "when": {
                "enabled": true
              },
              "label": "Audio protocol",
              "default": "i2s",
              "options": [
                {
                  "label": "I²S (Philips)",
                  "value": "i2s"
                },
                {
                  "label": "PDM (microphone)",
                  "value": "pdm"
                }
              ]
            },
            "sampleRate": {
              "kind": "select",
              "when": {
                "protocol": "i2s"
              },
              "label": "Sample rate",
              "default": 48000,
              "options": [
                {
                  "label": "8 kHz",
                  "value": 8000
                },
                {
                  "label": "16 kHz",
                  "value": 16000
                },
                {
                  "label": "32 kHz",
                  "value": 32000
                },
                {
                  "label": "44.1 kHz",
                  "value": 44100
                },
                {
                  "label": "48 kHz",
                  "value": 48000
                },
                {
                  "label": "96 kHz",
                  "value": 96000
                },
                {
                  "label": "192 kHz",
                  "value": 192000
                }
              ]
            }
          },
          "netlist": {
            "when": {
              "enabled": true
            },
            "buses": [
              {
                "bus": "i2s",
                "tag": "SAI1.bus",
                "signalsFrom": "interfaces.SAI1.pad_assignments"
              }
            ]
          },
          "firmware_contract": {
            "entries": [
              {
                "via": "register",
                "type": "register",
                "value": 1,
                "register": "RCC.CLK_EN.SAI1"
              }
            ]
          }
        },
        "SPI1": {
          "fields": {
            "wires": {
              "kind": "select",
              "when": {
                "enabled": true
              },
              "label": "Wiring",
              "default": "4wire",
              "options": [
                {
                  "label": "4-wire (separate MISO)",
                  "value": "4wire"
                },
                {
                  "label": "3-wire (bidirectional)",
                  "value": "3wire"
                }
              ]
            }
          },
          "netlist": {
            "when": {
              "enabled": true
            },
            "buses": [
              {
                "bus": "spi",
                "tag": "SPI1.bus",
                "signalsFrom": "interfaces.SPI1.pad_assignments"
              }
            ]
          },
          "firmware_contract": {
            "entries": [
              {
                "via": "register",
                "type": "register",
                "value": 1,
                "register": "RCC.CLK_EN.SPI1"
              }
            ]
          }
        },
        "SPI3": {
          "fields": {
            "wires": {
              "kind": "select",
              "when": {
                "enabled": true
              },
              "label": "Wiring",
              "default": "4wire",
              "options": [
                {
                  "label": "4-wire (separate MISO)",
                  "value": "4wire"
                },
                {
                  "label": "3-wire (bidirectional)",
                  "value": "3wire"
                }
              ]
            }
          },
          "netlist": {
            "when": {
              "enabled": true
            },
            "buses": [
              {
                "bus": "spi",
                "tag": "SPI3.bus",
                "signalsFrom": "interfaces.SPI3.pad_assignments"
              }
            ]
          },
          "firmware_contract": {
            "entries": [
              {
                "via": "register",
                "type": "register",
                "value": 1,
                "register": "RCC.CLK_EN.SPI3"
              }
            ]
          }
        },
        "USART2": {
          "netlist": {
            "when": {
              "enabled": true
            },
            "buses": [
              {
                "bus": "uart",
                "tag": "USART2.bus",
                "signalsFrom": "interfaces.USART2.pad_assignments"
              }
            ]
          },
          "firmware_contract": {
            "entries": [
              {
                "via": "register",
                "type": "register",
                "value": 1,
                "register": "RCC.CLK_EN.USART2"
              }
            ]
          }
        }
      }
    }
  },
  "features": {
    "led": {
      "kind": "led",
      "color": "red",
      "label": "Status LED",
      "control": {
        "pin": "PB12",
        "via": "gpio",
        "polarity": "active-high"
      },
      "center_x": -1600,
      "center_y": -2350,
      "rotation": 90
    },
    "clock": {
      "kind": "clock",
      "sources": [
        {
          "type": "hsi16",
          "description": "16MHz internal RC",
          "frequency_mhz": 16
        },
        {
          "type": "hse",
          "description": "32MHz crystal (on-board)",
          "frequency_mhz": 32
        }
      ],
      "boot_source": "hsi16"
    },
    "antenna": {
      "kind": "antenna",
      "type": "integrated",
      "label": "Integrated 2.4GHz antenna",
      "location": "tile end opposite the pads",
      "protocols": [
        "BLE"
      ],
      "keepout_note": "no copper traces or planes above or below the antenna end of the tile",
      "frequency_band": "2.4GHz"
    }
  }
}