 Hello everyone, I'm William Maia, STM Microelectronics FAE for Microcontrollers, and welcome to this video series on STM32 Cube Programmer. In this video series, we will go over some topics to better understand how we can use these two to program, read, and configure your STM32 microcontroller. First, we will see an overview of the STM32 Cube Programmer. And then we will go over this configuration panel. We will look at the memory view, the external loader view, how to read, change, and program the option bytes. And last, but not least, how the command line works. In this video, we will cover the overview, configuration panel, and the memory view. So what is the STM32 Cube Programmer? The Cube Programmer, as we will call it for now on, is a standalone software tool that can automate STM32 programming via a very easy graphical and or command line interface. It is capable of using a variety of different debug and boot loader interfaces. It can program and configure the option bytes after or before the firmware download. It can be automated via command line interface for repetitive and multiple device programming. The Cube Programmer is a multiple OS tool, so it can run on Windows, Linux, and macOS computers. We can use it to erase, program, and handle internal or external microcontroller memory. As I mentioned, we can have several interfaces to connect to this microcontroller. This could be stlink via swd or gtag, bootloader via uwork, usb, or ota for stm32wp, for example. When using the stlink v3 with its bridging capability, you can also use additional bootloader interfaces, as i2c, spi, or can to program stm32mcues with native bootloaders that support those interfaces. We can perform several memory operations using the tool, read memory, or registers using their address. With a specific starting address and size, save the memory dump. This could be firmware or memory regions for analysis. Download a new firmware binary to the MCU. Verify if the firmware on the MCU is the same as the file loaded into the tool. Another useful memory operation is the full chip arrays, erasing the entire flash memory in just one click. Another features to interact with memory are in the Erasing and Programming tab. Here we can erase the entire chip memory also, but we can't do it in small memory areas instead. We can program the microcontroller with a selected firmware image, and also we can program the option bytes in an automatic mode tab. This tab is very useful if you do want to have access to programming tool for the assembly line. As we saw for internal memory, we can work with various external memories connected to the microcontroller. The tool offers an external loader tab, where we can find the supported external loaders. For more information on external loaders, look for a video in this series on the ST YouTube channel. To finish the memory operations, we have one of the most useful tabs on the Qt Programmer, the Option Bytes tab. In this section you can read, modify and apply all the different configurations we have for the option bytes, such as memory protections, user configurations for bootloader interface and startup, and some more security features. So now let's see the tool in action. First of all, let's take a look at the various interface we have here. We can use this drop-down box to connect over UR to the SM32 native bootloader. If the bootloader supports it, we can connect it over USB 2. For the SM32WP MCUs, we also have an over-the-air OTA interface to connect over BLE. By the way, we do have a series of videos explaining how to use that interface in that family. Take a look in the ST YouTube channel. If you use S-Link V3, you have additional options for bootloader interfaces such as I2C, SPI and CANBUS. If you want to connect over a bootloader interface, you may need to make sure your user configuration option bytes have enabled that in some cases. You can find details in another video in this series. With ST-Link V2 or V3, you have the option to connect over the debug interface SWG or GTag. Our Cortex M0 families do not have GTag interface, so let's choose SWG here to connect to our SM32 board. One important point here is that sometimes, depending on what you have flashed in your flash memory before, for example, code that puts the MCU in low-power mode, you may need to choose a different configuration after selecting the interface itself. Take a look at this mode configuration. We can, for example, choose between normal, under reset, or hot plug, depending on your application needs. One robot solution to make a reliable connection irrespective of different CPU states is to choose under reset for mode and set the reset mode to hardware reset. This will ensure that the debugger connects to the CPU core while the CPU is held in reset. We can also choose the frequency, the access part, and if this ST-Link is being shared by more than one instance of Qt Programmer or other debug hosts. Sometimes your ST-Link firmware version could be too old to connect or to enable some features. In this case, we can use Qt Programmer to upgrade the firmware by clicking this firmware upgrade button. Now that we connected our microcontroller, we can try several memory operations. Let's start with the read memory. Here we can see the entire microcontroller memory. It's important to notice that this is only possible because we have not set any read protection level for this MCU. We will show how to do that in another video in this series. We can also access the registers using their address with a specific starting address and size. Now that we have read the microcontroller memory, we can also save all the data we extracted. Take a look at how easy it is to do that using the drop-down selection. The opposite is also possible in this field. We can program our microcontroller using a .elf or .pin file that we have in our computer. To do this, we have to open the file from this open file tab or the plus sign. Choose the file we want to program and then click the download button. Another useful feature is to verify if the device memory has the same code as our file to make sure that we are running the same version of firmware, for example. To do that, just click on verify and the tool should give us a success message in the memory and file matches. That's all for this video. Hope you have fun in this journey and thank you and we will have more videos on Qprogrammer topic in the near future.