1.. zephyr:board:: myra_sip_baseboard 2 3Overview 4******** 5 6The Myra SiP Baseboard features Antmicro's **Myra** SiP, which integrates the **STM32G491REI6** MCU, 7128kB FRAM, and FTDI FT231XQ USB to UART converter. The board is equipped with temperature, 8humidity, and pressure sensors, designed to help monitor conditions in server rooms. 9 10The sensors are placed on a separate island that is detachable from the main PCB and can be 11installed directly in the required place. It provides local storage for data logging and a battery 12backup for protection against data loss. The board can be used as a building block for PoC solutions 13for monitoring environmental parameters. 14 15Key features include: 16 17- STM32G491REI6 MCU (Cortex-M4, 170 MHz) 18- 128 KB Fujitsu FRAM 19- FTDI FT231XQ USB to UART converter 20- 50 mm x 26.5 mm PCB 21- USB-C Connector for data and power 22- SHT45 temperature + humidity sensor 23- BME280 temperature + humidity + pressure sensor 24- QWIIC connectors for peripheral expansion 25- RTC with battery backup 26 27More information about the board can be found on `Antmicro's Open Hardware Portal <https://openhardware.antmicro.com/boards/environment-sensor-sip-baseboard>`_. 28 29Hardware 30******** 31 32Myra SiP provides the following hardware: 33 34- **STM32G491REI6 MCU**: 35 36 - ARM Cortex-M4 CPU with FPU, up to 170 MHz 37 - Clock Sources: 38 39 - 4 to 48 MHz external crystal oscillator (HSE) 40 - 32 kHz crystal oscillator for RTC (LSE) 41 - Internal 16 MHz RC (±1%) 42 - Internal low-power 32 kHz RC (±5%) 43 - 2 PLLs for system clock, USB, audio, ADC 44 - RTC: Real-time clock with hardware calendar, alarms, and calibration 45 - Timers: 46 47 - 1x 32-bit timer and 2x 16-bit timers with up to 4x IC/OC/PWM or pulse counter and quadrature 48 (incremental) encoder input 49 - 3x 16-bit advanced motor control timers with up to 8x PWM channels, dead time generation, 50 emergency stop 51 - 1x 16-bit timer with 2x IC/OC, one OCN/PWM, dead time generation, emergency stop 52 - 2x watchdog timers (independent, window) 53 - 2x 16-bit basic timers 54 - SysTick timer 55 - 1x low-power timer 56 - I/Os: Up to 86 fast I/Os, most 5V tolerant 57 - Memory: 58 59 - 512 KB Flash memory with ECC and PCROP protection 60 - 96 KB SRAM including 32 KB with hardware parity check 61 - Analog peripherals: 62 63 - 3x 16-bit ADCs with up to 36 channels, hardware oversampling, and resolution up to 16-bit 64 - 4x 12-bit DAC channels 65 - 4x ultra-fast rail-to-rail analog comparators 66 - 4x operational amplifiers with built-in PGA 67 - Internal temperature sensor and voltage reference with support for three output voltages 68 (2.048 V, 2.5 V, 2.9 V) 69 - Communication Interfaces: 70 71 - 2x FDCAN controllers supporting flexible data rate 72 - 3x I2C Fast Mode Plus (1 Mbit/s) with 20 mA current sink, SMBus/PMBus support 73 - 5x USART/UART (ISO 7816, LIN, IrDA, modem control) 74 - 1x LPUART 75 - 3x SPI interfaces (2x with multiplexed half-duplex I²S) 76 - 1x SAI (serial audio interface) 77 - USB 2.0 full-speed with LPM and BCD support 78 - IRTIM (infrared interface) 79 - USB Type-C™ / USB Power Delivery (UCPD) 80 - Other Peripherals: 81 82 - 16-channel DMA controller 83 - True Random Number Generator (RNG) 84 - CRC calculation unit, 96-bit unique ID 85 - Development support: SWD, JTAG, Embedded Trace Macrocell™ 86 - ECOPACK2® compliant packages 87 88- **128 KB Fujitsu MB85RS1MT FRAM**: Local storage for data logging, allowing non-volatile memory storage. 89 90- **FTDI FT231XQ USB to UART converter**: Provides a reliable USB to UART interface. 91 92 93More information about STM32G491RE can be found here: 94 95- `STM32G491RE on www.st.com`_ 96 97Other board's peripherals: 98-------------------------- 99 100- USB-C Connector: For data and power. 101- SHT45 sensor: 102 103 - Relative humidity accuracy: ±1.0% RH 104 - Operating humidity range: 0-100% RH 105 - Temperature accuracy: ±0.1°C 106 - Operating temperature range: -40°C to 125°C 107- BME280 sensor: 108 109 - Relative humidity accuracy: ±3% RH 110 - Temperature accuracy: ±1°C 111 - Pressure accuracy: ±1 hPa 112 - Operating temperature range: -40°C to 85°C 113 - Pressure range: 300-1100 hPa 114- QWIIC connectors: For easy peripheral expansion. 115 116Supported Features 117------------------ 118 119The Zephyr ``myra_sip_baseboard`` board target supports the following hardware features: 120 121+-----------+------------+-------------------------------------+ 122| Interface | Controller | Driver/Component | 123+===========+============+=====================================+ 124| NVIC | on-chip | nested vector interrupt controller | 125+-----------+------------+-------------------------------------+ 126| UART | on-chip | serial port-polling; serial | 127| | | port-interrupt | 128+-----------+------------+-------------------------------------+ 129| PINMUX | on-chip | pinmux | 130+-----------+------------+-------------------------------------+ 131| GPIO | on-chip | gpio | 132+-----------+------------+-------------------------------------+ 133| I2C | on-chip | i2c | 134+-----------+------------+-------------------------------------+ 135| WATCHDOG | on-chip | independent watchdog | 136+-----------+------------+-------------------------------------+ 137| PWM | on-chip | pwm | 138+-----------+------------+-------------------------------------+ 139| ADC | on-chip | adc | 140+-----------+------------+-------------------------------------+ 141| DAC | on-chip | dac controller | 142+-----------+------------+-------------------------------------+ 143| FLASH | on-chip | flash memory | 144+-----------+------------+-------------------------------------+ 145| EEPROM | on-chip | eeprom | 146+-----------+------------+-------------------------------------+ 147| NVS | on-chip | nvs | 148+-----------+------------+-------------------------------------+ 149| COUNTER | on-chip | rtc | 150+-----------+------------+-------------------------------------+ 151| SPI | on-chip | spi | 152+-----------+------------+-------------------------------------+ 153| die-temp | on-chip | die temperature sensor | 154+-----------+------------+-------------------------------------+ 155| FDCAN1 | on-chip | can controller | 156+-----------+------------+-------------------------------------+ 157| RTC | on-chip | rtc | 158+-----------+------------+-------------------------------------+ 159 160Other hardware features are not yet supported on this Zephyr port. 161 162Connections and IOs 163------------------- 164 165Antmicro's Myra SiP Baseboard provides the following default pin mappings for peripherals: 166 167.. rst-class:: rst-columns 168 169- LPUART_1_TX : PA2 170- LPUART_1_RX : PA3 171- I2C_1_SCL : PB8 172- I2C_1_SDA : PB9 173- SPI_CS2 : PB2 174- SPI_CS3 : PA7 175- SPI_2_SCK : PB13 176- SPI_2_MISO : PB14 177- SPI_2_MOSI : PB15 178- PWM_2_CH1 : PA5 179- USER_PB : PC13 180- LD2 : PA5 181- ADC1_IN1 : PA0 182- DAC1_OUT1 : PA4 183- USB_MCU_N : PA11 184- USB_MCU_P : PA12 185- SWDIO-JMTS : PA13 186- SWCLK-JTCK : PA14 187- JTDI : PA15 188- JTDO : PB3 189- JTRST : PB4 190- FRAM_HOLD (ACTIVE LOW) : PB10 191- FRAM_WP (ACTIVE LOW) : PB11 192- FRAM_CS (ACTIVE LOW) : PB12 193- GPIO_PC10 : PC10 194- GPIO_PC11 : PC11 195- GPIO_PC12 : PC12 196- PF0_OSC : PF0 197 198System Clock 199------------ 200 201System clock can be driven by an internal or an external oscillator, as well as by the main PLL 202clock. By default, system clock is driven by PLL clock at 170MHz (boost mode selected), which in 203turn, is driven by the 8MHz high speed external oscillator (HSE). While the HSE oscillator is 204capable of operating at frequencies up to 48 MHz by default, in this configuration, it is 205specifically set to 8 MHz. 206 207Serial Port 208----------- 209 210The Myra SiP Baseboard has 5 U(S)ARTs. The Zephyr console output is assigned to LPUART1. The default 211settings are 115200 8N1. 212 213Programming and Debugging 214************************* 215 216Applications for the ``myra_sip_baseboard`` board target can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). 217 218Flashing 219******** 220 221This board has a USB-JTAG interface and can be used with OpenOCD. 222 223Connect the Myra SiP Baseboard to your host computer using the USB port, then build and flash 224the application. Here is an example for :zephyr:code-sample:`hello_world`. 225 226.. zephyr-app-commands:: 227 :zephyr-app: samples/hello_world 228 :board: myra_sip_baseboard 229 :goals: build flash 230 231Then run a serial host program to connect with the Myra SiP Baseboard, e.g. using picocom: 232 233.. code-block:: console 234 235 $ picocom /dev/ttyUSB0 -b 115200 236 237.. warning:: 238 The board has only one port that is used for both programming and the console. For this reason, it is 239 recommended to set ``CONFIG_BOOT_DELAY`` to an arbitrary value. This is especially important when 240 running twister tests on the device. You should then also use the ``--flash-before`` and 241 ``--device-flash-timeout=120`` options: 242 243 .. code-block:: console 244 245 $ scripts/twister --device-testing --device-serial /dev/ttyUSB0 --device-serial-baud 115200 -p myra_sip_baseboard --flash-before --device-flash-timeout=120 -v 246 247Debugging 248********* 249 250You can debug an application in the usual way. Here is an example for the 251:zephyr:code-sample:`hello_world` application. 252 253.. zephyr-app-commands:: 254 :zephyr-app: samples/hello_world 255 :board: myra_sip_baseboard 256 :maybe-skip-config: 257 :goals: debug 258 259.. _STM32G491RE on www.st.com: 260 https://www.st.com/en/microcontrollers-microprocessors/stm32g491re.html 261