1.. zephyr:board:: nucleo_g0b1re 2 3Overview 4******** 5The Nucleo G0B1RE board features an ARM Cortex-M0+ based STM32G0B1RE MCU 6with a wide range of connectivity support and configurations. Here are 7some highlights of the Nucleo G0B1RE board: 8 9- STM32 microcontroller in QFP64 package 10- Board connectors: 11 12 - Arduino Uno V3 connectivity 13 - ST morpho extension pin headers for full access to all STM32 I/Os 14 15- On-board ST-LINK/V2-1 debugger/programmer with SWD connector 16- Flexible board power supply: 17 18 - 5V_USB_STLK from ST-Link USB connector 19 - VIN (7 - 12V) from ARDUINO connector or ST morpho connector 20 - E5V from ST morpho connector 21 - 5V_USB_CHG from ST-LINK USB connector 22 - 3.3V on ARDUINO connector or ST morpho connector 23 24- Three LEDs: USB communication (LD1), user LED (LD4), power LED (LD3) 25- Two push-buttons: USER and RESET 26- 32.768 kHz crystal oscillator 27 28More information about the board can be found at the `Nucleo G0B1RE website`_. 29 30Hardware 31******** 32Nucleo G0B1RE provides the following hardware components: 33 34- STM32G0B1RE in LQFP64 package 35- ARM 32-bit Cortex-M0+ CPU 36- 64 MHz max CPU frequency 37- Voltage range from 1.7 V to 3.6 V 38- 512 KB Flash 39- 144 kB SRAM 40- 32-bit timers(1) 41- 16-bit timers(11) 42- watchdogs(2) 43- systick(1) 44- Calendar RTC with alarm and periodic wakeup 45- I2C(3) 46- USART(6) 47- LPUART(2) 48- 32 Mbit/s SPI(3) multiplexed with I2S(2) 49- HDMI_CEC(1) 50- USB 2.0 FS device (crystal-less) and host controller(1) 51- USB Type-C Power Delivery controller 52- CAN FD(2) 53- GPIO (up to 94) with external interrupt capability 54- Tamper Pins(3) 55- 12-bit ADC with 16 channels 56- 12-bit DAC with 2 channels(2) 57- Analog Comparator(3) 58- 12-channel DMA 59 60 61More information about STM32G0B1RE can be found here: 62 63- `G0B1RE on www.st.com`_ 64- `STM32G0B1 reference manual`_ 65 66 67Supported Features 68================== 69 70The Zephyr nucleo_g0b1re board configuration supports the following hardware features: 71 72+-----------+------------+-------------------------------------+ 73| Interface | Controller | Driver/Component | 74+===========+============+=====================================+ 75| MPU | on-chip | arm memory protection unit | 76+-----------+------------+-------------------------------------+ 77| NVIC | on-chip | nested vector interrupt controller | 78+-----------+------------+-------------------------------------+ 79| UART | on-chip | serial port-polling; | 80| | | serial port-interrupt | 81+-----------+------------+-------------------------------------+ 82| PINMUX | on-chip | pinmux | 83+-----------+------------+-------------------------------------+ 84| GPIO | on-chip | gpio | 85+-----------+------------+-------------------------------------+ 86| I2C | on-chip | i2c | 87+-----------+------------+-------------------------------------+ 88| SPI | on-chip | spi | 89+-----------+------------+-------------------------------------+ 90| CLOCK | on-chip | reset and clock control | 91+-----------+------------+-------------------------------------+ 92| COUNTER | on-chip | rtc | 93+-----------+------------+-------------------------------------+ 94| WATCHDOG | on-chip | independent watchdog | 95+-----------+------------+-------------------------------------+ 96| PWM | on-chip | pwm | 97+-----------+------------+-------------------------------------+ 98| ADC | on-chip | adc | 99+-----------+------------+-------------------------------------+ 100| DAC | on-chip | dac | 101+-----------+------------+-------------------------------------+ 102| die-temp | on-chip | die temperature sensor | 103+-----------+------------+-------------------------------------+ 104| FDCAN | on-chip | CAN controller | 105+-----------+------------+-------------------------------------+ 106 107Other hardware features are not yet supported in this Zephyr port. 108 109The default configuration can be found in the defconfig file: 110:zephyr_file:`boards/st/nucleo_g0b1re/nucleo_g0b1re_defconfig` 111 112Connections and IOs 113=================== 114 115Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as 116input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the 117GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current 118capable except for analog inputs. 119 120Default Zephyr Peripheral Mapping: 121---------------------------------- 122 123- UART_1 TX/RX : PC4/PC5 124- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com) 125- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C) 126- I2C2 SCL/SDA : PA11/PA12 127- SPI1 NSS/SCK/MISO/MOSI : PB0/PA5/PA6/PA7 (Arduino SPI) 128- SPI2 NSS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15 129- USER_PB : PC13 130- LD4 : PA5 131- PWM : PA6 132- ADC1 IN0 : PA0 133- ADC1 IN1 : PA1 134- DAC1_OUT1 : PA4 135- FDCAN1 RX/TX: PA11/PA12 136- FDCAN2 RX/TX: PB0/PB1 137 138For more details please refer to `STM32 Nucleo-64 board User Manual`_. 139 140Programming and Debugging 141************************* 142 143Nucleo G0B1RE board includes an ST-LINK/V2-1 embedded debug tool interface. 144 145Applications for the ``nucleo_g0b1re`` board configuration can be built and 146flashed in the usual way (see :ref:`build_an_application` and 147:ref:`application_run` for more details). 148 149Flashing 150======== 151 152The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 153so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 154 155Alternatively, OpenOCD, JLink, or pyOCD can also be used to flash the board using 156the ``--runner`` (or ``-r``) option: 157 158.. code-block:: console 159 160 $ west flash --runner openocd 161 $ west flash --runner jlink 162 $ west flash --runner pyocd 163 164For STM32G0 support pyocd needs additional target information, 165which can be installed by adding "pack" support with the following pyocd command: 166 167.. code-block:: console 168 169 $ pyocd pack --update 170 $ pyocd pack --install stm32g0 171 172Flashing an application to Nucleo G0B1RE 173---------------------------------------- 174 175Here is an example for the :zephyr:code-sample:`blinky` application. 176 177.. zephyr-app-commands:: 178 :zephyr-app: samples/basic/blinky 179 :board: nucleo_g0b1re 180 :goals: build flash 181 182You will see the LED blinking every second. 183 184Debugging 185========= 186 187You can debug an application in the usual way. Here is an example for the 188:zephyr:code-sample:`hello_world` application. 189 190.. zephyr-app-commands:: 191 :zephyr-app: samples/hello_world 192 :board: nucleo_g0b1re 193 :maybe-skip-config: 194 :goals: debug 195 196References 197********** 198 199.. target-notes:: 200 201.. _Nucleo G0B1RE website: 202 https://www.st.com/en/evaluation-tools/nucleo-g0b1re.html 203 204.. _STM32G0B1 reference manual: 205 https://www.st.com/resource/en/reference_manual/dm00371828.pdf 206 207.. _STM32 Nucleo-64 board User Manual: 208 https://www.st.com/resource/en/user_manual/dm00452640.pdf 209 210.. _G0B1RE on www.st.com: 211 https://www.st.com/en/microcontrollers/stm32g0b1re.html 212 213.. _STM32CubeProgrammer: 214 https://www.st.com/en/development-tools/stm32cubeprog.html 215