 Hello everyone, I'm William Maia, ST Microlaternics FAE for Microcontrollers and welcome back to this video series on the STM32 Q-Programmer. In this video series, we'll go over some topics to better understand how we can use the Q-Programmer to read and configure your STM32 microcontroller. In the earlier videos of this series, we saw an introduction to the STM32 Q-Programmer and learned how to navigate through the configuration panel and the memory view. Now, we will see how we can work with external memory using an external loader and how to read and program their option bytes. As I mentioned in the first video, Q-Programmer can also do all the functions we have shown for external memories as well. To make this possible, ST has developed external loaders. An external loader is a specific firmware that temporarily runs on the STM32 target to program, read and erase external memories connected to that MCU. If you want to better understand and develop your own external loader, please take a look at ST YouTube channel for the external loader video series. We see that we already have a bunch of external loaders that were developed for ST boards, so we can use that to test this feature in Q-Programmer. Here is a tip. You can use this as a starting point to develop your own external loaders for your custom board. After we understand how we can program an external memory and we will take a look at the option bytes view. This is one of the most important views in Q-Programmer. Here we can read, configure and reset all the configurations for our STM32 microcontrollers. We can go from changing a peripheral behavior to locking the entire microcontroller memory from this window. So let's get started. Now, let's test our external loader capabilities. First, click on the bottom left IC icon with an EL inside it. Here we see a very large list with all the external loaders that ST has created for our boards. You can also see any external loaders that you have created yourself. Let's choose the one we have for our target board, connected via a ST link to our computer. Then connect to your board as we saw in the previous videos. You can see that after we connect, we will have access to the external memory, as if it is part of our microcontroller memory. Here we have the start address and the size, so we can test some of our original interactions like arrays and program memory. Let's go to the raising and program view. Because we enabled the external loader first and then initiated the Q-Programmer connection, we can now see the memory regions in the drop-down window on the left. We can choose between the different external memories we have if our board has more than one, obviously. And also erase sectors or the full memory from this window. Let's test the full chip erase option. This takes some time, since we are depending on the external memory interface speed. We can also work with small memory regions, and we can also program these regions with our own .l file, as we saw in the previous videos from the internal memory. Another very useful feature we have in Q-Programmer is the option-byte view. Let's take a look at this. Click on the top-left third icon with an OB inside it. Here we can configure microcontroller memory protection, boot options and some user configurations, such as watchdog functionalities and low-poor settings. Let's play with the most common and most dangerous part of the option bytes. The readout protection. Since we already connected, we can just try to change it to a different value. But keep in mind, it's important to notice that if we change it to level 2, we will not be able to change it back to level 0 or 1, so we will lose the microcontroller memory access. So never test it if you are not intentionally locking the microcontroller memory. So now we can change it to level 1 by changing the value to 0xBB or anything that is not 0xAA or 0xCC. After choosing the 0BB value, we can apply the new value and wait for the message that it was successful. So let's use some of our older knowledge and go to the memory view. Let's type the starting address as 0x0800000 and then try to read it. Hmm, we are not able to read anymore because we have protected the entire microcontroller memory from reads via the debug interface. We can now move it back to a value where we can read again. Let's go back to the option by to field them. Now let's change it back to 0xAA or level 0, no protection. Click on apply and wait for the message. Now we are able to read the microcontroller memory again, but we see that it is fully erased. This is because the RDP level 1 to 0 operation always trigger unmasked arrays. So wherever you do this, make sure that you don't have something the MCU microcontroller that you don't want to lose. Alright, that's all for now. Hope you are having fun in this memory control journey and stay tuned. We will have more videos on the QProgrammer topic in a near future.