<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Stm32 on Carmine Noviello</title><link>https://www.carminenoviello.com/tags/stm32/</link><description>Recent content in Stm32 on Carmine Noviello</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 23 Nov 2022 12:25:42 +0000</lastBuildDate><atom:link href="https://www.carminenoviello.com/tags/stm32/index.xml" rel="self" type="application/rss+xml"/><item><title>How to quickly import a STM32CubeMX project inside an Eclipse project</title><link>https://www.carminenoviello.com/2015/11/02/quickly-import-stm32cubemx-project-eclipse-project/</link><pubDate>Mon, 02 Nov 2015 14:08:08 +0000</pubDate><guid>https://www.carminenoviello.com/2015/11/02/quickly-import-stm32cubemx-project-eclipse-project/</guid><description>&lt;p&gt;I&amp;rsquo;ve implemented a faster way to automatically import CubeMX project into an Eclipse tool-chain based on the GNU ARM Plugin, as described either on &lt;a href="https://www.carminenoviello.com/?p=1590"&gt;this blog&lt;/a&gt; and in &lt;a href="https://www.carminenoviello.com/?page_id=1918"&gt;my book&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;ve implemented a bare-bone python script that simply &amp;ldquo;translates&amp;rdquo; a CubeMX project for the SW4STM32 (aka AC6) tool-chain in a project generated with the GNU ARM plugin. The script can be downloaded from &lt;a href="https://github.com/cnoviello/CubeMXImporter"&gt;my github account&lt;/a&gt;. Let&amp;rsquo;s see how this works.&lt;/p&gt;&#10;&lt;p&gt;First of all, we have to generate a new Eclipse project using the GNU ARM Plugin. Go to &lt;strong&gt;File-&amp;gt;New-&amp;gt;C Project&lt;/strong&gt; and select &amp;ldquo;Hello World ARM Cortex-M C/C++ project. You can choose the project name you want. Click on “&lt;strong&gt;Next&lt;/strong&gt;“. Here we assume &amp;ldquo;&lt;strong&gt;test1&lt;/strong&gt;&amp;rdquo; as Eclipse project name.&lt;/p&gt;</description></item><item><title>Running STM32CubeMX on Mac OS. Finally!</title><link>https://www.carminenoviello.com/2015/09/09/running-stm32cubemx-macos-finally/</link><pubDate>Wed, 09 Sep 2015 06:20:05 +0000</pubDate><guid>https://www.carminenoviello.com/2015/09/09/running-stm32cubemx-macos-finally/</guid><description>&lt;aside class="callout callout--warning" role="note" aria-label="Warning"&gt;&#10; &lt;p class="callout__title"&gt;Warning&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Read carefully&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;This post is outdated, since the latest CubeMX 4.14 officially supports both Linux and MacOS. So, you no longer need to apply the instructions reported here.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;Being a STM32 programmer on Mac OSX, I was frustrated every time I had to launch a virtual machine running Windows only to use the STM32CubeMX tool from ST. For those of you new to this program, it&amp;rsquo;s a really useful graphical tool that allows to automatically generate setup files for a STM32 MCU according the configuration we need. For example, if we have the Nucleo-F401RE, which is based on the STM32F401RE MCU, and we want to use its user LED (marked as LD2 on the board), than STM32CubeMX will automatically generate all files required to configure the MCU (clock, peripherals port, and so on) and the GPIO connected to LED (port GPIO 5 on port A on Nucleo boards).&lt;/p&gt;</description></item><item><title>How to precisely measure microseconds with STM32</title><link>https://www.carminenoviello.com/2015/09/04/precisely-measure-microseconds-stm32/</link><pubDate>Fri, 04 Sep 2015 09:41:12 +0000</pubDate><guid>https://www.carminenoviello.com/2015/09/04/precisely-measure-microseconds-stm32/</guid><description>&lt;p&gt;I received this apparently simply question from a reader of this blog: how can I delay a fistful of microseconds in STM32? That is, how to measure microseconds precisely in STM32?&lt;/p&gt;&#10;&lt;p&gt;The answer is: there are several ways to do this, but some methods are more accurate and other ones are more versatile among different MCUs and clock configuration.&lt;/p&gt;&#10;&lt;p&gt;Let&amp;rsquo;s consider one member of the STM32F4 family: STM32F401RE, the MCU that equips the STM32Nucleo-F401RE board. This micro is able to run up to 84Mhz using internal RC clock. This means that ever 1µs, the clock cycles 84 times. So, we need a way to count 84 clock cycles to assert that 1µs is elapsed (I&amp;rsquo;m assuming that you can tolerate the internal RC clock 1% accuracy).&lt;/p&gt;</description></item><item><title>Adding ethernet connectivity to a STM32-Nucleo</title><link>https://www.carminenoviello.com/2015/08/28/adding-ethernet-connectivity-stm32-nucleo/</link><pubDate>Fri, 28 Aug 2015 05:23:37 +0000</pubDate><guid>https://www.carminenoviello.com/2015/08/28/adding-ethernet-connectivity-stm32-nucleo/</guid><description>&lt;p&gt;One drawback of the Nucleo ecosystem is the lack of a version with ethernet connectivity or a dedicated shield officially supported by ST. There are 90 different STM32 MCUs available that provide an Ethernet MAC interface (this means that only an external ethernet transceiver - also called &lt;em&gt;phyter&lt;/em&gt; - and few other things are required to bring your MCU to the IoT world). STM32Cube (the HAL officially supported by ST) also provides support for &lt;a href="http://savannah.nongnu.org/projects/lwip/"&gt;lwIP&lt;/a&gt; stack. But, all the current Nucleo boards are designed with a MCU without an Ethernet interface (I think that the main reason is that only two STM32 MCUs with Ethernet MAC are available in LQFP-64 package and the Nucleo boards are designed to be pin-to-pin compatible between its releases - L0, F1, etc). This means that without a dedicated expansion shield it is impossible to add network connectivity to our Nucleo. And this is a sin considering what that MCU can do.&lt;/p&gt;</description></item><item><title>Getting started with STM32F746G-DISCO</title><link>https://www.carminenoviello.com/2015/07/13/started-stm32f746g-disco/</link><pubDate>Mon, 13 Jul 2015 05:06:56 +0000</pubDate><guid>https://www.carminenoviello.com/2015/07/13/started-stm32f746g-disco/</guid><description>&lt;p&gt;ST Microelectronics recently expanded its portfolio of STM32 microcontrollers with the new STM32F7 family. These are the new best-in-class MCUs from ST, with a Cortex-M7 core able to run up to 216Mhz (future releases will run up to 400Mhz with 2000 CoreMark index), with an internal flash up to 1Mb and 360Kb of RAM. STM32F7 is also able to run from external flash memory without performance penalty, thanks to a L1 cache (this is probably the most interesting aspect of these MCUs). STM32F7 are targeted for High-end embedded applications, especially to multimedia ones, and I think that it&amp;rsquo;s far from low-budget applications and hobbyist uses. At the time of writing, these MCUs are quite pricy, ranging from 12€ to 20€/pcs for low-volume orders. This is definitely a really high price, especially if you consider that &lt;a href="https://www.olimex.com/Products/Components/IC/A20/"&gt;you can find around&lt;/a&gt; Cortex-A7 MCUs for less than 10€. But I think that the price will be dramatically reduced in the future.&lt;/p&gt;</description></item><item><title>Running FreeRTOS on a STM32Nucleo using a free GCC/Eclipse toolchain</title><link>https://www.carminenoviello.com/2015/06/22/running-freertos-stm32nucleo-free-gcceclipse-toolchain/</link><pubDate>Mon, 22 Jun 2015 05:50:14 +0000</pubDate><guid>https://www.carminenoviello.com/2015/06/22/running-freertos-stm32nucleo-free-gcceclipse-toolchain/</guid><description>&lt;p&gt;Using a micro like the STM32F4, able to run up to 160Mhz, with 512Kb of flash and about 100k of RAM, without using an operating system is a nonsense. Although it&amp;rsquo;s perfectly possible to use some forms of cooperative scheduling to execute firmware activities, basically this not convenient especially when dealing with low level events related to hardware (eg. interrupt handling) and aspects related to synchronization. As long as your firmware starts to grow, you&amp;rsquo;ll need constructs to synchronize firmware activities, like queues or semaphores. Moreover, especially when dealing with low-power devices, a busy spin (while(some condition);) it&amp;rsquo;s not the best solution if you have to fight with mAh.&lt;/p&gt;</description></item><item><title>Build STM32 applications with Eclipse, GCC and STM32Cube</title><link>https://www.carminenoviello.com/2015/06/04/stm32-applications-eclipse-gcc-stcube/</link><pubDate>Thu, 04 Jun 2015 14:13:18 +0000</pubDate><guid>https://www.carminenoviello.com/2015/06/04/stm32-applications-eclipse-gcc-stcube/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;If you landed to this page, you probably already know that I&amp;rsquo;ve covered this topic in the past. &lt;a href="https://www.carminenoviello.com/?p=998"&gt;I showed in a series made of three posts&lt;/a&gt; how to successfully setup a complete Eclipse/GCC ARM tool-chain to develop applications for the STM32Nucleo-F4 developing board. Since then, many people have reported me positive feedback on that tutorial. But, some of them had serious troubles in getting those instructions working for other STM32 families (F0, F1 and so on). This was mainly caused by the &lt;a href="http://gnuarmeclipse.livius.net/blog/"&gt;GNU ARM Eclipse plug-in&lt;/a&gt;, or rather by the included templates in the plug-in.  When a new project is created using the plug-in wizard, a template is used depending on processor family. Unfortunately, the plug-in author has updated just the template for STM32-F4 family to the more recently STM32Cube-F4 HAL framework from ST (which still supports only commercial IDE&amp;hellip;..), leaving the other templates still based on the old Standard Peripheral Library, which is no longer supported by ST and STM32CubeMX tool used in my tutorial. *This causes my instructions to be wrong for processor families different from STM32-F4. *&lt;/p&gt;</description></item><item><title>BlueNRG shield for STM32 Nucleo</title><link>https://www.carminenoviello.com/2015/03/08/bluenrg-shield-stm32-nucleo/</link><pubDate>Sun, 08 Mar 2015 15:32:51 +0000</pubDate><guid>https://www.carminenoviello.com/2015/03/08/bluenrg-shield-stm32-nucleo/</guid><description>&lt;p&gt;I recently received during a ST training day a sample of the X-NUCLEO-IDB04A1 shield. This shield is based on the BlueNRG network processor from ST and it allows to create Bluetooth Low Energy (BLE) applications using an Arduino compatible developing board. Obviously, ST designed the software for this shield to be used mainly with its Nucleo range of developing boards. In fact, all necessary libraries and examples needed to use this shield are designed to run on Nucleo-L0 and Nucleo-F4 boards using their respective HAL. However, ST still doesn&amp;rsquo;t provide official support to free GCC/Eclipse toolchains (an this is a pity&amp;hellip;), and it&amp;rsquo;s a little bit tricky to use ST demo files and BlueNRG HAL without using a commercial IDE supported by ST (IAR, TrueSTUDIO, etc).&lt;/p&gt;</description></item><item><title>How to use STM32 Nucleo serial port</title><link>https://www.carminenoviello.com/2015/03/02/how-to-use-stm32-nucleo-serial-port/</link><pubDate>Mon, 02 Mar 2015 07:17:28 +0000</pubDate><guid>https://www.carminenoviello.com/2015/03/02/how-to-use-stm32-nucleo-serial-port/</guid><description>&lt;p&gt;As we have seen in the previous tutorial about this new developing board from ST, the STM32 Nucleo provides an integrated ST Link v2.1 interface. ST Link is mainly designed to allow flashing of target MCU trough the mini-USB interface. But, it provides at least another really useful feature: a Virtual COM port. When you install the ST-Link drivers, a new device appears in your hardware devices list: the ST-Link Virtual COM port.&lt;/p&gt;</description></item><item><title>Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part III</title><link>https://www.carminenoviello.com/2015/01/16/setting-gcceclipse-toolchain-stm32nucleo-part-iii/</link><pubDate>Fri, 16 Jan 2015 07:12:39 +0000</pubDate><guid>https://www.carminenoviello.com/2015/01/16/setting-gcceclipse-toolchain-stm32nucleo-part-iii/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;Let&amp;rsquo;s recap what we&amp;rsquo;ve done in the two previous parts of this series. In the &lt;a href="https://www.carminenoviello.com/?p=998" title="Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part I"&gt;first part&lt;/a&gt; we&amp;rsquo;ve configured Eclipse and GCC to build applications for the ARM-Cortex platform. We&amp;rsquo;ve used the GNU ARM Eclipse plug-ins to generate a minimal yet working example (a simple blinking LED app) for our STM32 Nucleo board. Next, we&amp;rsquo;ve used the CubeMX tool from ST to generate the right initialization code for our Nucleo. Lastly, we used ST-Link Utility to upload generated binary code on the target MCU. In the &lt;a href="https://www.carminenoviello.com/?p=1256" title="Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part II"&gt;second part&lt;/a&gt; we&amp;rsquo;ve taken a deeper look in the debug topic. We&amp;rsquo;ve configured OpenOCD and GDB to allow step-by-step execution of our application on the Nucleo target MCU.&lt;/p&gt;</description></item><item><title>Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part II</title><link>https://www.carminenoviello.com/2015/01/07/setting-gcceclipse-toolchain-stm32nucleo-part-2/</link><pubDate>Wed, 07 Jan 2015 14:13:50 +0000</pubDate><guid>https://www.carminenoviello.com/2015/01/07/setting-gcceclipse-toolchain-stm32nucleo-part-2/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;In the &lt;a href="https://www.carminenoviello.com/?p=998" title="Setting up a GCC/Eclipse toolchain for STM32Nucleo – Part I"&gt;first part&lt;/a&gt; of this series we&amp;rsquo;ve successfully setup a minimal yet working tool-chain to develop applications for the STM32 family (we&amp;rsquo;ve especially focused on STM32Nucleo developing board). We&amp;rsquo;ve based the tool-chain over the Eclipse IDE and the GCC cross-compiler for ARM Cortex platform. We&amp;rsquo;ve also created a test project (a simple blinking LED) and uploaded it on our Nucleo using the ST-Link Utility.&lt;/p&gt;</description></item><item><title>Setting up a GCC/Eclipse toolchain for STM32Nucleo - Part I</title><link>https://www.carminenoviello.com/2014/12/28/setting-gcceclipse-toolchain-stm32nucleo-part-1/</link><pubDate>Sun, 28 Dec 2014 17:09:33 +0000</pubDate><guid>https://www.carminenoviello.com/2014/12/28/setting-gcceclipse-toolchain-stm32nucleo-part-1/</guid><description>&lt;aside class="callout callout--info" role="note" aria-label="Note"&gt;&#10; &lt;p class="callout__title"&gt;Note&lt;/p&gt;&#10; &lt;div class="callout__content"&gt;&lt;p&gt;&lt;strong&gt;Please, read carefully.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Thanks to the feedbacks I have received, I reached to the conclusion that it&amp;rsquo;s really hard to cover a topic like this one in the room of a blog post. So, I started writing a book about the STM32 platform. In the free book sample you can find the whole complete procedure better explained. You can download it &lt;a href="https://leanpub.com/mastering-stm32"&gt;from here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/aside&gt;&#10;&#10;&lt;p&gt;I recently got in my hands a new development board from STMicroelectronics: STM32Nucleo. It&amp;rsquo;s a development board based on the STM32 MCU and it is compatible with the Arduino UNO pinout. This means that it&amp;rsquo;s possible to use the hundreds of shields available for the Arduino. However this is true in theory, since the most important aspect of Arduino&amp;rsquo;s world is the software (based on libraries, examples, and so on) made for this popular platform.&lt;/p&gt;</description></item></channel></rss>