 Hello, my name is Andre Barata and I'll be your tutor for today. I would like to welcome you all to the STM32L4 MOOC. Today's session will be about a general purpose input output commonly designated as GPIO. The objective for these sessions are to learn how to set up pins as GPIO in QBMX, to generate code and use Hull functions to operate with a configured GPIO. The main goal is to generate code in the QBMX that allow us to toggle an LED attached to the microcontroller. To do so, we will make use of the HAL toggle functions which will set the pin output value from high to low and low to high. Since the operations inside of the microcontroller happened in a higher frequency than our eyes can perceive, we will need to add some delay in our program. We can do so by calling the HAL delay function. The dismantling delay in between toggling operations will allow us in fact to see the LED turning off and on. After this introduction and without further ado, let's open the QBMX program. Already with the STM32 QBMX open, we are going to start creating our first initialization by clicking on New Project. Here we are going to type our part number and in this case is STM32L476VG. Here you select the part and you start the project. When the project loads, you will see in the center of your screen the microcontroller pin out. In order to set up a pin, you will need to left click on it. In this case, the pin is the PA8 and you should define it as GPIO output. Remember, PA8 is directly wired to your green LED on your L4 Discovery board. After setting the pin to fully configurated, you just need to go to the configuration tab on the top side, go to System, GPIO and here you will see the pin configuration. In this case we just have the PA8 selected. To configure the PA8, you just need to make sure that the GPIO output level is set for low GPIO mode output push-pull. We will have no pull-up and no pull-down resistor connected in the inside and the maximum output speed can be set as low. After this step, we just need to go to File, Save Project As. We need to choose an appropriate name for our project. You need to choose an appropriate location where you would like to save it. And then we just need to select the tool chain that we plan to use and for our examples we are going to be using System Workbench for STM32. After this step is complete, we just need to generate our code. After this action is complete, we just need to press Open Project and System Workbench for STM32 will be loaded with our project. As you might have guessed after investigating the code generated by Cubemix, this is just a skeleton of our future application. In order to make the LED to toggle to complete the application, you just need to go to the while loop, make use of the whole GPIO toggle function. In this case is GPIOE and the PIN. As you might remember is GPIO PIN8. Don't forget to add the whole delay function and this is in milliseconds. So 500 milliseconds in between each toggling operation. After this we will just need to compile and to flush our program into our board. To debug and flush our application we just need to go to the Hammer button, wait until our program is built and then in the Debug button we will switch to the Debug mode and then if you would press Resume, if everything goes accordingly your board must be blinking.