 We are now going to start with practical demonstration, and in this demo we will see a typical LPBOM application, an I2C master acquisition from a sensor triggered by a low power timer. In our example we are going to interface with ST's LSM6 DSO IMU. We will use the accelerometer part of this IMU. Low power timer 1 will be used as a trigger for the I2C transfer and also as a trigger to low power timer 3, which generates a PWM output on a GPO with a variable duty cycle. During the acquisition from the accelerometer, STM42U5 will be in stop-to mode with no software running, and it will wake up on a DMA transfer complete interrupt. As software tool prerequisites, we are going to use QMX 6.5.0 and STM42QU5 1.1.0. In addition, we will measure power consumption with STM42Q monitor power 1.1.1. This practical demonstration has been developed using NUCLEO-U575 connected via I2C to XNUCLEO-IKS-01A3. In this slide you have a reference of the connection needed as well as the reading and writing addresses for the accelerometer part of the IMU. In order to measure the power performance, we will interface NUCLEO-U575 with XNUCLEO LPM-A01 by the connection you can see in this slide. XNUCLEO LPM-01A will be connected via USB micro to our laptop to interface with STM42Q monitor power. We can now move to QMX in order to get started with peripheral configuration. Let's open QMX version 6.5.0. We click on access to MCU selector and we type STM42U575ZI T6Q. We select the power number and we click on start project. We won't use trath zone so we will not initialize it. We click OK, a new project we start to load. You can see the typical pinout view on the right and list of peripherals available on the left. While being on pinout view, we will select PC13 and we are going to assign user button to it. So we have to add a label here named user underscore button. After that, on PB7, we assign GPIO output functionality. And as label, we add blue underscore LED. We can now switch to the A to Z tab and we enable iCache one way. This trath zone cache tends to reduce the number of accesses to the memory, limiting the overall power consumption. As so previously, LPBAM makes use of DMA. So we are going to use LPDMA in link at least mode. We select channel zero and on channel zero setting, we have to make sure to have selected the generation of the transfer complete event at the end of the last link at least item. We also have to enable an interrupt from the NVIC settings. We can now have a look at power tab. We will talk more about this later on. As we wish to get the lowest possible power consumption, we will choose SMPS regulator, which is the switching mode power supply. On clock tab, we do not need to apply any change. We will keep the default configuration with 4MHz sysclock derived from MSIS. This is all for standard QBMAX configuration. We can now switch to LPBAM scenario and configuration tab, which is the biggest news coming from QBMAX 6.5.0. We are now on the LPBAM scenario tab. On the left, we have LPBAM management sector when I can add application. I click add application and once it is started, we can see two new tabs called scenario and Q. Qs, as we saw, are collection of functions which are linked by link at least based on LPBMA. A scenario is a collection of multiple Qs. Still on LPBAM management tab, we see on the left the settings sections. By checking these boxes, we will link the peripherals to the smartrun domain and LPBMA1. In addition, in LPBAM Functional Toolbox, we see a complete set of peripherals belonging to smartrun domain and related functionalities that can be used with LPBAM. These are all peripherals we saw previously in the slide. We have ADC, comparators, DAC, LP team, UR, SPY, OPAMP and VRF buff. We are now going to focus our attention on I2C3, which is the one we will use to interface with our IMU. In order to implement our scenario, we will use two Qs, made up of five and three functions respectively. Here we have the first Q implementing I2C transfer. This is using LPBMA channel zero. First function will be used to enable accelerometer and second and first, I use it to get six bytes of data from the accelerometer. Functions four and five are used to read six more bytes from the accelerometer. In total, we will acquire 12 bytes containing ASC by Z data. And after that, we will wake up with DMA transfer complete interrupt. Content of DTX buffer to enable the accelerometer and RX buffer to retrieve data are reported in this slide. Additional detail register map and command set of LSM6DSO can be found in application note number 5192 on ST.com. We now focus on the tab in the middle called Q1. On the right, we can find configuration for the whole Q. By means of this configuration, we define the behavioral variable function group that we will add. QBMAX abstracts the complexity in a super easy and efficient way, as you can see. As first parameter, for example, we can define the Q circularity that we will use later on. A second parameter priority, and in addition, QBMAX gives us the chance to enable various interrupts for an or handling overrun or transfer complete. In this case, we will select transfer complete interrupt. We will enable it as preemption priority will select the default and we stick with no privilege. It's now time to add functions in the queue. As we remember from the slide, we have five functions to be added. We can select them from the tab on the left. Click on I2C3 and first and second functions were master and transmit data. The first function was master receive data. The fourth was master transmit data. And the fifth was master receive data. Once done, we can click on first function, which contains the two bytes needed by our IMU to be initialized. It's a master transmit. Therefore, we need to add the device writing address. In our case, for the IMU we are using, it will be 0xd6. We are going to give our data buffer name ATXBuffer and as an offset, we are going to add 0. We will be sending two bytes, so number of data will be equal to 2. And we condition this first transfer to the rising edge of low power timer 1, channel 1. We have now completed the configuration of the first node. You have experienced that also in this case the easiness provided by QBMX in configuring the peripherals and the data packet to be sent. On the same logic, we will configure master and transmit function number 2. All the difference is that buffer name and number of data will be BTXBuffer and 1 respectively. The device address will still be the same 0xd6. Now we have to remember that we need to condition the I2C transfer on rising edge of the low power timer 1, channel 1. Now we can switch to function number 3, which is the master receive data. This is a reading, so we have to put the reading address of the sensor, which is 0xd7. We will assign our receiving buffer a name. As offset, we are going to add 0. We will explain this parameter later on. Number of data will be 6. We want also this function to be conditioned by a trigger, which is low power timer 1, channel 1. Now we have created and configured our first three functions. Function number 4 will be identical to function 2 and function number 5 will be equal to function 3. The only difference is that on data buffer offset, we will add 6, as we would like to have the whole 12 bytes written inside buffer temp to avoid overwriting. We are now going to configure very quickly these two additional functions. Now we can move to the Pinout and Configuration tab. First thing to notice in Pinout and Configuration tab is that it looks very similar to the well-known equivalent tab in Cubemax. All the difference is that we only have peripherals listed that can be active in Smartron domain while being in stop 2. We will see that Cubemax generates all initialization code needed to start LP1 scenario easily adding a few lines of code. If we want to be sure about peripherals to be configured, we can click on Check LP1 Design button. In this case, we are getting a warning, mentioning that I2C3 is used in Cubemax but not configured. This is another example of error-checking integration into Cubemax. As a first thing, let's configure I2C3. Very easily, we just need to enable it and we are fine with the default settings as GPIOs are aligned with our Outro settings. LP Team 1 should also be configured. We select as Mode Count Internet Clock Events. Reactivate Channel 1. We define the Compare Mode. And we are going to put Period and Pulse Value in order to have a trigger every 200 milliseconds. We now switch to an important tab called Power. Here we can define all the steps to enable power saving once LP1 scenario is activated. It's a new feature introduced in Cubemax specifically for ultra-low power performance of STM32U5. We are going to enable power down for all SRAM and related pages. Only exception will be SRAM for an iCache as we need to have nav available in stop 2 for running our application and getting low power performance. Once done, we can switch to ClockTab. Coming to ClockTab, we see it's very easy to understand as we already have grayed out all the selection of oscillator which are not available in LP1 mode. We can just select the wake-up clock between MSI and HSI and we have to select the clock for the peripherals we enabled. For I2C3, we select MSIK and for LP Team 1, we select LSI. Configuration is over. Now let's come back to Cubemax to generate code. From Project Manager, we can give our project a name and then we can select QBidE as preferred toolchain. On Code Generator, we flag the option Settle Free Pins as Analog. Then we can click on Generate Code. Now we can click Open Project and start to work on the firmware on QBidE.