1.. zephyr:board:: stm32g0316_disco 2 3Overview 4******** 5 6The STM32G0316-DISCO Discovery kit helps to discover features of STM32G0 in SO8 package. 7This discovery kit offers an SO8 to DIL8 module designed with the STM32G031J6 microcontroller 8and allows the user to develop applications. It includes an on-board ST-LINK/V2-1 to debug 9and program the embedded STM32 microcontroller. 10 11Hardware 12******** 13 14- STM32G031J6 Arm |reg| Cortex |reg|-M0+ core-based microcontroller, 15 featuring 32 Kbytes of Flash memory and 8 Kbytes of SRAM, in an SO8 package 16- 1 user LED 17- 1 reset/user push-button 18- Individual and breakable STM32 SO8 to DIL8 module 19- ST-LINK Micro-B USB connector 20- DIL8 socket to ease programming of the STM32 MCU 21- On-board ST-LINK/V2-1 debugger/programmer 22 23For more information about the STM32G03x SoC and the STM32G0316-DISCO board, see these ST reference documents: 24 25- `STM32G031J6 website`_ 26- `STM32G031 datasheet`_ 27- `STM32G0x1 reference manual`_ 28- `STM32G0316-DISCO website`_ 29 30Supported Features 31================== 32 33.. zephyr:board-supported-hw:: 34 35Connections and IOs 36=================== 37 38Due to the small number of I/O pins on the SO8 package, multiple die I/Os are bonded 39to the same package pins to maximize the number of peripherals which can be used. 40Care must be taken not to set two I/Os which are connected together to conflicting 41states (e.g. both as outputs, one low, the other high). 42 43Default Zephyr Peripheral Mapping: 44---------------------------------- 45 46.. rst-class:: rst-columns 47 48- UART_1 TX/RX : PA9/PB7 (pins 5/1) 49- USER_PB : PA0 (pin 4) 50- LD2 : PA12 (pin 6) 51 52Programming and Debugging 53************************* 54 55The STM32G0316-DISCO board includes an ST-LINK/V2-1 embedded debug tool interface. 56 57Applications for the ``stm32g0316_disco`` board configuration can be built the 58usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). 59 60Flashing 61======== 62 63The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 64so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 65 66Alternatively, OpenOCD or JLink can also be used to flash the board using 67the ``--runner`` (or ``-r``) option: 68 69.. code-block:: console 70 71 $ west flash --runner openocd 72 $ west flash --runner jlink 73 74Flashing an application to the STM32G0316-DISCO 75----------------------------------------------- 76 77Here is an example for the :zephyr:code-sample:`blinky` application. 78 79.. zephyr-app-commands:: 80 :zephyr-app: samples/basic/blinky 81 :board: stm32g0316_disco 82 :goals: build flash 83 84You should see the LED blinking every second. 85 86Debugging 87========= 88 89You can debug an application in the usual way. Here is an example for the 90:zephyr:code-sample:`hello_world` application. 91 92.. zephyr-app-commands:: 93 :zephyr-app: samples/hello_world 94 :board: stm32g0316_disco 95 :maybe-skip-config: 96 :goals: debug 97 98.. _STM32G031J6 website: 99 https://www.st.com/en/microcontrollers-microprocessors/stm32g031j6.html 100 101.. _STM32G031 datasheet: 102 https://www.st.com/resource/en/datasheet/stm32g031j6.pdf 103 104.. _STM32G0x1 reference manual: 105 https://www.st.com/resource/en/reference_manual/dm00371828.pdf 106 107.. _STM32G0316-DISCO website: 108 https://www.st.com/en/evaluation-tools/stm32g0316-disco.html 109 110.. _STM32CubeProgrammer: 111 https://www.st.com/en/development-tools/stm32cubeprog.html 112