{"id":2299,"date":"2024-01-26T04:19:07","date_gmt":"2024-01-26T04:19:07","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=2299"},"modified":"2024-01-26T04:19:10","modified_gmt":"2024-01-26T04:19:10","slug":"getting-started-with-stm32g0-and-stm32cubeide-blinking-led","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=2299","title":{"rendered":"Getting Started with STM32G0 and STM32CubeIDE: Blinking LED"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"400\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/pt156578902-100_original_arm_mcu_stm32g070kbt6_stm32g070_stm32g_lqfp_32_microcontroller.jpg.webp\" alt=\"\" class=\"wp-image-2300\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/pt156578902-100_original_arm_mcu_stm32g070kbt6_stm32g070_stm32g_lqfp_32_microcontroller.jpg.webp 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/pt156578902-100_original_arm_mcu_stm32g070kbt6_stm32g070_stm32g_lqfp_32_microcontroller.jpg-300x300.webp 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/pt156578902-100_original_arm_mcu_stm32g070kbt6_stm32g070_stm32g_lqfp_32_microcontroller.jpg-150x150.webp 150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/pt156578902-100_original_arm_mcu_stm32g070kbt6_stm32g070_stm32g_lqfp_32_microcontroller.jpg-250x250.webp 250w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>In this series of guide, we shall use STM32CubeIDE with STM32CubeMX integration with IDE to drive the peripheral of the STM32G070.<\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>STM32G070 Features.<\/li><li>Hardware connection.<\/li><li>Project setup.<\/li><li>Blinking LED code.<\/li><li>Results.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. STM32G070 Features:<\/h2>\n\n\n\n<p>The STM32G070CB\/KB\/RB mainstream microcontrollers are based on high-performance Arm<sup>\u00ae<\/sup>&nbsp;Cortex<sup>\u00ae<\/sup>-M0+ 32-bit RISC core operating at up to 64 MHz frequency. Offering a high level of integration, they are suitable for a wide range of applications in consumer, industrial and appliance domains and ready for the Internet of Things (IoT) solutions.<\/p>\n\n\n\n<p>The devices incorporate a memory protection unit (MPU), high-speed embedded memories (128 Kbytes of Flash program memory with read protection, write protection, and 36 Kbytes of SRAM), DMA and an extensive range of system functions, enhanced I\/Os and peripherals. The devices offer standard communication interfaces (two I<sup>2<\/sup>Cs, two SPIs \/ one I<sup>2<\/sup>S, and four USARTs), one 12-bit ADC (2.5 MSps) with up to 19 channels, a low-power RTC, an advanced control PWM timer, five general-purpose 16-bit timers, two basic timers, two watchdog timers, and a SysTick timer.<\/p>\n\n\n\n<p>The devices operate within ambient temperatures from -40 to 85\u00b0C. They can operate with supply voltages from 2.0 V to 3.6 V. Optimized dynamic consumption combined with a comprehensive set of power-saving modes allows the design of low-power applications.<\/p>\n\n\n\n<p>VBAT direct battery input allows keeping RTC and backup registers powered.<\/p>\n\n\n\n<p>The devices come in packages with 32 to 64 pins.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>All features<ul><li>Core: Arm<sup>\u00ae<\/sup>\u00a032-bit Cortex<sup>\u00ae<\/sup>-M0+ CPU, frequency up to 64 MHz\u00a0<\/li><li>-40\u00b0C to 85\u00b0C operating temperature\u00a0<\/li><li>Memories\u00a0<ul><li>128 Kbytes of Flash memory with protection\u00a0<\/li><li>36 Kbytes of SRAM (32 Kbytes with HW parity check)\u00a0<\/li><\/ul><\/li><li>CRC calculation unit\u00a0<\/li><li>Reset and power management\u00a0<ul><li>Voltage range: 2.0 V to 3.6 V\u00a0<\/li><li>Power-on\/Power-down reset (POR\/PDR)\u00a0<\/li><li>Low-power modes:Sleep, Stop, Standby\u00a0<\/li><li>V<sub>BAT<\/sub>\u00a0supply for RTC and backup registers\u00a0<\/li><\/ul><\/li><li>Clock management\u00a0<ul><li>4 to 48 MHz crystal oscillator\u00a0<\/li><li>32 kHz crystal oscillator with calibration\u00a0<\/li><li>Internal 16 MHz RC with PLL option\u00a0<\/li><li>Internal 32 kHz RC oscillator (\u00b15 %)\u00a0<\/li><\/ul><\/li><li>Up to 59 fast I\/Os\u00a0<ul><li>All mappable on external interrupt vectors\u00a0<\/li><li>Multiple 5 V-tolerant I\/Os\u00a0<\/li><\/ul><\/li><\/ul><ul><li>7-channel DMA controller with flexible mapping\u00a0<\/li><li>12-bit, 0.4 \u00b5s ADC (up to 16 ext. channels)\u00a0<ul><li>Up to 16-bit with hardware oversampling\u00a0<\/li><li>Conversion range: 0 to 3.6V\u00a0<\/li><\/ul><\/li><li>11 timers: 16-bit for advanced motor control, five 16-bit general-purpose, two basic 16-bit, two watchdogs, SysTick timer\u00a0<\/li><li>Calendar RTC with alarm and periodic wakeup from Stop\/Standby\u00a0<\/li><li>Communication interfaces\u00a0<ul><li>Two I<sup>2<\/sup>C-bus interfaces supporting Fast-mode Plus (1 Mbit\/s) with extra current sink, one supporting SMBus\/PMBus and wakeup from Stop mode\u00a0<\/li><li>Four USARTs with master\/slave synchronous SPI; two supporting ISO7816 interface, LIN, IrDA capability, auto baud rate detection and wakeup feature\u00a0<\/li><li>Two SPIs (32 Mbit\/s) with 4- to 16-bit programmable bitframe, one multiplexed with I<sup>2<\/sup>S interface\u00a0<\/li><\/ul><\/li><li>Development support: serial wire debug (SWD).<\/li><\/ul><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"916\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-1024x916.png\" alt=\"\" class=\"wp-image-2305\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-1024x916.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-300x268.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-768x687.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-1150x1029.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-750x671.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-400x358.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM-250x224.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-7.07.20\u202fAM.png 1238w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Note: Taken from ST website.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Hardware Connection:<\/h2>\n\n\n\n<p>Before heading into the programming section, we shall connect the LED to PA0 with 100 Ohm resistor in series as shown in the figure below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-829x1024.png\" alt=\"\" class=\"wp-image-2309\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-829x1024.png 829w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-243x300.png 243w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-768x949.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-1243x1536.png 1243w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-1150x1421.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-750x927.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-400x494.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM-250x309.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-26-at-6.57.26\u202fAM.png 1340w\" sizes=\"(max-width: 829px) 100vw, 829px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. Project Setup:<\/h2>\n\n\n\n<p>First step open STM32CubeIDE.<\/p>\n\n\n\n<p>This window will appear:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"409\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-1024x409.jpg\" alt=\"\" class=\"wp-image-2301\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-1024x409.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-300x120.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-768x307.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-1150x459.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-750x300.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-400x160.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19-250x100.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-23-19.jpg 1222w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Give the workspace a name for example STM32G0_Tut.<\/p>\n\n\n\n<p>Once you click on launch. we shall start new project as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-1024x572.jpg\" alt=\"\" class=\"wp-image-2303\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-1024x572.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-300x167.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-768x429.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-1536x857.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-2048x1143.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-1150x642.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-750x419.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-400x223.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-03-250x141.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>From left window, click on Create new STM32 Project.<\/p>\n\n\n\n<p>Then, type your STM32G0 exact number (STM32G070RB in this case)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"826\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-1024x826.jpg\" alt=\"\" class=\"wp-image-2304\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-1024x826.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-300x242.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-768x619.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-1536x1239.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-2048x1652.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-1150x928.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-750x605.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-400x323.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-24-55-250x202.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Select the MCU from the list and click on next.<\/p>\n\n\n\n<p>Next, give the project a name which is in this case blinky and click on finish.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25-865x1024.jpg\" alt=\"\" class=\"wp-image-2306\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25-865x1024.jpg 865w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25-253x300.jpg 253w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25-768x909.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25-750x888.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25-400x473.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25-250x296.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-25-25.jpg 980w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p>At this stage, if you don&#8217;t have the package, it will download the package. So, please be patient with this process.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This window will appear, click on PA0 and select GPIO Output and then press on code generate (the gear icon)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-1024x572.jpg\" alt=\"\" class=\"wp-image-2307\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-1024x572.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-300x167.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-768x429.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-1536x857.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-2048x1143.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-1150x642.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-750x419.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-400x223.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-26-27-250x141.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Now, the IDE will open main.c.<\/p>\n\n\n\n<p>In main.c, add the following code at User Code begin 3:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-1024x572.jpg\" alt=\"\" class=\"wp-image-2308\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-1024x572.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-300x167.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-768x429.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-1536x857.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-2048x1143.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-1150x642.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-750x419.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-400x223.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/01\/2024-01-26_06-28-23-250x141.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_SET);\n\t  HAL_Delay(1000);\n\t  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_RESET);\n\t  HAL_Delay(1000);<\/pre><\/div>\n\n\n\n<p>Or <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_0);\n\t  HAL_Delay(1000);<\/pre><\/div>\n\n\n\n<p>Upload the code to your board and you should notice the LED is blinking.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Demo:<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Getting Started with STM32G0 and STM32CubeIDE: Blinking LED\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/eVQu9PoVJuY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Happy coding \ud83d\ude42<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this series of guide, we shall use STM32CubeIDE with STM32CubeMX integration with IDE to drive the peripheral of the STM32G070. In this guide, we shall cover the following: STM32G070 Features. Hardware connection. Project setup. Blinking LED code. Results. 1. STM32G070 Features: The STM32G070CB\/KB\/RB mainstream microcontrollers are based on high-performance Arm\u00ae&nbsp;Cortex\u00ae-M0+ 32-bit RISC core operating [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2299","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2299"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2299"}],"version-history":[{"count":2,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2299\/revisions"}],"predecessor-version":[{"id":2310,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2299\/revisions\/2310"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}