 Hello, and welcome on our STM32Cube IDE basics training session. In this part, we will focus on Power Consumption Calculator. This is a part of STM32Cube IDE application, which allows us to estimate the power consumption of our application. To demonstrate this application, I would create a new project with an existing workspace. I'll go to File, New, STM32 project. Again, I'm going through STM32 target selector. We can do, of course, some estimation of current consumption for existing project, but this case I would like to demonstrate some particular settings. OK, so we select exactly the same microcontroller, G071RB, and RQFP version. I just press Next. I would name it G0PCC. All the settings are the same. Default ones. Yes. Cubemix or Device Configuration perspective would be opened. OK, so we've got empty project. Again, I would select serial wire as a debug interface. In our application, I would select as well RTC, with clock source, with wakeup activate calendar, with a wakeup capability. Because I would like to demonstrate to you this Power Consumption Calculator in connection with low power amounts. So let's assume that we will use RTC with internal wakeup. We will use as well PC13 in the configuration of SystemWakeup2 as well. And additionally, we will select ADC1 with some channels measurements. So let's select two channels and from Communication Peripherals. Let's select low power to award one. In asynchronous mode, 9600 bits per second. Seven, let's do 8 bits, including parity. Without parity, one stop bit, the rest remains the same. For the clock configuration, I would keep the default settings. I would not focus much on the configuration. And I'm switching to Power Consumption Calculator for this particular application. My idea is to demonstrate to you some typical application, low power application, which should perform some analog measurements from time to time, receive, transmit some data over the award, and wake up periodically using RTC auto wakeup functionality, or dedicated pin connected to PC13. Before we go further, let's save our application, CTRL S. Yes, it will generate a code. And now let's switch to Tools and Power Consumption Calculator. We can start with VDD selection. It can be 1.8, 2.4, 3.0, 3.6 volts. Let's select 3 volts. Temperature cannot be changed. And now we can select the battery, which we'll use to work with our application. So when I press select, a new window pop up. When I can either add my own battery, which can be specified by me, or I can select already existing and defined batteries. I would select classical AA1. It's 1.5 volts. This is why I need two of those. I can put here two in series. I can increase as well the capacity. I can put some of those in parallel as well. This application allows me to estimate how much time I can work with my application using a specified set of batteries. Next point is the definition of the steps. So how the application will work. To do this, I select a new step. As a result, this kind of window is popping up. I select the power mode. So either run or end of low power modes. So usually at the beginning we are in a run mode to configure all the peripherals. And now I can enable all the peripherals, which has been enabled by me within the pinout and configuration phase. I would select this. As you can see, we've got ADC, GPIOA, GPIOC, low power UART and RTC. Having these, we can continue. So power range. With an STM32G0, we've got two power ranges, medium and high. More information about the power range available in the G0 family you can find on dedicated online training. I would select the range to medium, which allows me to limit the current consumption. So as we enabled all the peripherals, which has been selected by us in the previous step, we can continue our evaluation. So power range will set to medium to lower the total current consumption of the system. Memory fetch type. We will use flash, standard one. The VDD, sorry, the programmed voltage sources, battery, CPU frequency. We will use 2 MHz to lower the power consumption. Clock configuration. We will use HSI because we are using internal clock. And step duration. So how long we will be in this run mode at the beginning. I would set on 10 milliseconds. We can specify as well some additional current consumption, which can be related to connected peripherals, connected chips to our microcontroller. So I would keep it like this without any additional points. We've got the step consumption more or less 500 micrograms. I press add. And I can see on the screen right now the current consumption in time. So right now it is IDD by step. So this step only. We can see right now the current consumption within one step. If we will use only this step, we can count on our battery for 7 months, 22 days and 1 hour. Okay, but with this constant beginning that I would like to create a low power application. This is why I would add a new step. And within this new step, I would select the stop mode. Stop one. Stop one mode with active RTC only. And I would like to be in this state for one second without any additional current consumption. I'm adding this mode as well. And after this one second, I would like to be in run mode again. But before this, I would like to show to you right now how our consumption profile has changed. Please have a look. Right now we've got all two steps run and stop. And we've got the average current consumption curve, which is on the level of 12 micrograms. Okay, so we create the next new step. So this time it would be wake up from stop. We cannot select run mode or sleep mode or other modes because we need to wake up. First wake up from stop mode. So this is quite automatic mode. So I just edit. And after wake up from stop, I can add run mode again. So new step. I'm selecting run, memory flash, memory fetch from flash. And again, ADC. I can enable all the peripherals from the pinout. But this time I would like to be in this mode only for one millisecond. Above two megahertz, clock configuration HSI, one millisecond add. Okay, so we've got four steps. We can save the sequence. We can load other sequence. We can compare the sequence with the other ones. We can display the sequence as well. We can have a look how much time we can work on the batteries we selected. So if we keep this scenario like this, we can work with these batteries 13 years, two months, 23 days and seven hours. Average current consumption is 12.7 microamps. We can select with different display of this profile. So for example, we can select IP consumption. So in split on ADCs and IGPIO you are... So all the peripherals we are using in microamps. There is a split on digital and analog part, which is important in components like ADC or reference voltage used by the ADC. We can select only analog, we can select only digital peripherals. We've got a split between run and low power modes. So there are various numbers of display of the information. Then we can save it, we can print it for further use. What is good in this application is that this power consumption calculator allows you to estimate. To estimate the current consumption of the application, how it is working. And all the data which are used within this application are taken from the datasheet. So in the real application you can be sure that your data, your realistic data would be very similar. So this is very good help. If you would like to start with the new development and just check whether the select microcontroller is appropriate or not to your application. Thank you for watching this video.