 I've added some slides that are just short to explain what we will do in the hands-on. We will run the boards, the MCU first on the LDO, and then after two seconds it will switch over to the S&PS supply. And then after two seconds again we will continue on the S&PS and we will power down the flashback too. And then we will enter the stop-to mode with full SRAM retention. And we will measure the power consumption in all these six steps. And after that we will wake up from the RTC with S&PS running, supplying the V-Core. And we will have some led driver stage here on and we will have the SRAM 4 retention on only. And then after that we will go down to stop-mode and here only keep the SRAM 4 retention. So in this case we have full SRAM retention and here we have only SRAM 4 and we can see the difference in power consumption. So for that there is some code we will add, I found it a little bit easier to just explain shortly here about the code, how to do it. So we will start, the MCU will always start on LDO. So we will just start to have a delay of two seconds and measure the power consumption then. And then we will switch over to S&PS, like number two here. And then after two seconds we will enable power down mode for flashback too. And then after that we will prepare the RTC. So we will have the RTC to wake up us after the step stop-2 mode after two seconds. So case number four is we're full SRAM retention. And after when we're waking up there from to case number five, we will run again with the led driver stage on so the led will light. And we have not changed so we have only the SRAM 4 retention. So here we are actually closing all the other RAM parts that can consume some current. So in the last step here I want to go into the while loop. We will still run on this but then we will go to stop-2. So actually down here we will go to stop-2 and under RAM 4 retention. So RTC is running and waking up every two seconds. So here we can see the low power really in this point. And hopefully we will have something like this and this I will come back to later on. So let's get started with the hands on now. So you can follow up in the sheet sheets. We have the different step here, start the project, some QBMX configuration. We have the QBID code and then we will start the power monitor later on here. But I prefer to show you when I do this so I start the QBMX. So we are starting choosing in the MCU like we have done in the morning. And we will again select MCU. So we choose that one and we will get the question about trust zone shortly. Here it comes. And we will choose without trust zone again. And we will now put the eye cache to direct map it cast. So it's one way. So that is the first. So now I'm in the slide one of five in the section 2.3 if you would like to follow. So we go into the eye cache here, choose that one. And we change the mode to one way. And we also would like to put the GPIO to the green led. And that on this board is assigned to the PC7. So PC7 we have here. So I click left click on that one and I just choose GPIO outputs. That one. And we get it here. PC7 as an output. OK. The RTC we will activate. So I go down in the list here but the peripherals click on the RTC. And here we will activate the clock source and also the wake up possibility we will configure to internal wake up. So now we have not to see that we'll wake up on the internal wake up. And now we just need to set some parameters. So we go down to the configuration window, parameter settings. And here in the wake up clock we can choose one hertz. And we would like to wake up every two seconds so we have time to measure. So we change the wake up count to two. And the NVIC settings we need also go into here. And we will tick the enable box. So actually now we have done the configuration we need. We go over to the project. We will have default clock configuration here and this and so on. So we move over to the project manager. And here we put the name to the project U5 mode, for example. And it will come and confirm into our workspace. Yes, for sure. We should change this to QBID. So now we have the tool chain for QBID. Let's go again. OK. So now we have code successfully generated. So we open the project. And now we will come into the QBID. Ask again about the workspace. Yes, I'm starting up my second screen. So I will move over here shortly. Here it comes. So here we are. So now we have come into QBID. And the first I will do is to close the old project here as it was open. So here we have the right one. We do need to do some changes here. So first we will change the link description file. So I open this one. And there's some copy code in slide two, QBID code in slide two. Here we are. So now we will change so all defined RAM will be the SRAM4. So we have all everything in SRAM4 that we will keep retained over the hands on. So we will just change the setup of the RAM and Flash addresses. So copy code here. And we go down in the Flash link description file. Actually here, the line, let's see, is it right, line 45, yes, here it is here. Now everything will be placed in SRAM4 through this. And now comes the next step here. Let's see if it's coming up here. Yes, if you look on the slide number three, there is something about the vehicle range. And I check this and this function call that is setting it to scale four is already implemented. So if you go into the main.c into line 123, there's no action either here. So here is the function call that change it to what the scale for. So there is no action on this one. Slide number three. So we continue to slide number four. And here comes now the whole software that we should copy in. And if you scroll down, sorry, if you scroll down on slide number four, you will see all the calls here. So you can just short check here. We will first have a two seconds delay so we can measure in LDO because it's starting up from reset in LDO. Then we change this in PS and wait two seconds so we can have a graph so we can measure that one. And then we switch off the bank two, wait two seconds. And now we enable the low power mode starting up the RTC. So we have a wake up timer for these two seconds. And we enter a stop mode too. And then we will also disable the retention for the S1 pages and all the other iCache, Dcache, DMA2, Dayram and all other peripherals for that we don't use. So I press copy code here. And we go into the main before I should go to the user code begin to. So that is line 98 in my code here, 98. And I paste in code I just copied on the sheet sheet. So here you see the code we go through is here now. And we should also go to the next step here and that's we should have some code in the while one loop. So we continue waking up and go to sleep to stop two. So this part here will stay inside the while one loop. Yeah, it's about the wake up time and stop two modes. So you will see it clear very soon here. So we copy that. And now it should be around line 143. Use the code begin free. Oh, I put it. Yeah, the intention is to sleep it to B, but it doesn't matter. So we have now the code inside the while one loop. And we should be ready now for a compiled. So let's hit the hammer. Okay, so now we have a compiled application code here. And now we should do some more steps in Qtube ID. We should disable the debug possibilities. So we go into the window to the run debug. So I'm going to get one here. Now we should go on this one here and debug configurations. And this you can close. And I know that you can then. I cannot type that now. Let's see. And double click on the STM32 Cortex-M. This one? Yeah, it means you've never run it. You've only ever done a run now. You've never opened a config for debug. Just a tip, if you were to have highlighted left clicked on the top level project name and then selected it, it would have picked it up automatically. Okay, so here we should go to the debugger. And in this here now we should disable under device settings, device settings here. Debug in lower power modes. Here we should disable this. So we don't have that running when you should measure the current consumption. And also I've seen some problems to have this out. So I normally go down to like 8,000 kilohertz for this one, for the interface of the IDB. Just to be sure we don't need to have it out too. We can have it that one and we can apply and then we can press debug. And now we are through. Wait for the back connection, yes. Okay, down that very fact successfully. What we also should do now is to stop how it's running here, so we should stop it here. So we terminate just to avoid extra power consumption here because it's still running on the board. So now we should step over here and we should go for the cube monitor session here. So now we should use the second board we have sent to you, the L562 discovery board. And this board we will use as a power shield. We will measure power consumption, the power current consumption for the first board, the U5 board. So here is the board and I think you have maybe already have a look into the board. There is, if you look to it and have the display in facing you, there is a switch one that you should be in the right position in this picture. Otherwise, you can have some extra consumption from the L5 from the board here. And also we should switch, we should move this jumper here. I think it's in default mode position here to the right. So you should switch it to the second from left. There should be one open to the left. And on this side here, you should connect the USB cable as well. And then it should start up the board. We should also, we have sent you this small wires and that we should use now. Preferable the blue one into the ground position. So if you turn the board around, you will see this connector C in 20, the white connector with four pins. And the most to the right is the ground. So preferable put the blue one there. And then pin number three, we should connect to the U5 board later on, but not really now, we should make calibration before. So just put it in to the connector here, the two wires. And we continue next slide. Keep these wires in the air. You can twist them around each other. And we should open the tube monitor. First, let's see the monitor. Here we go. We will make an calibration right now. Now when you have power up the L5 board, it shows up here. Yeah, the comports, virtual comports. You choose that one and then you press take control. And from that, we will now do a calibration if we step to the next tail. This is just one, if you don't find any virtual comports, you might press on the LCD screen to just get it starting and then it should pop up again. I have never had this issue on my side here, but in case of, but now we come to the calibrate. So I have the wires open, not connected to the USB right now and press calibrate, and let's you get a short sign box there. And that's fine. And now it comes to picture again, how to connect. So we were here on the L5 board pin number one, it's up here, so that one. So that is the ground. Now we connect that to the U5 board up in this corner. There's two pins that is ground. So one of these two you can use the ground for the blue one. And when you had done that, you can remove the jumper five, that's the position here, and connect the red cable wire between this pin number three to the left pin of these two, pin number two. You can also use an DMM multimeter here, just connect them on the jumper five to measure. And then of course you need to put it into the microamps connector and the black one, the common. So the next state now is that we should go over to the cube monitor program and here we should select the sampling frequency to 10,000. We have 10,000. And acquisition time, we click the infinity. And then we can start acquisition. I will just connect myself here. So maybe we get something like this. And we can first, yes, and then you can stop. Because you just start and stop it and we will change the X axis here. So we click here on this symbol here for settings. And the first one, I've set the axis. We can adjust the window size to around 20 seconds. This is quite good, here around something. So now we have from zero up to 20. And now we can actually start again. And we see that we have something happening here. Now it's in the wild one loop because it's running for a while. But by pressing the black button, the reset button on the UPI board, I will show you here again if we go back here. Here's the black one, that is the reset. So by pressing that one, you will start over the program. So I press it now and you will see it goes up here. So here comes the reset. And now it will get through. So I will stop it when this comes over here somewhere. I will stop it. We can do some measurement and stop it. So here we have from the reset with something like here. It goes two seconds here. We change to, this was LDO mode. Here is the SNPS mode and so on. So just to show you how to measure the current that can also be a little bit. In this program here, we press show report. And then you get, yeah, you can see the data behind here. This is the full scale here on this side. And here is the selected timeframe. And here you just go up and left click with the mouse and you pull out like you're making a rectangle here. And then you will zoom this in. And then you will see the current in average here. Was that clear or should I do it again? You can always go back by pressing show all. Now I got the whole here, but you can do it in a way here. So I will do a new measurement here. I will press the reset button and then you will see. So you can, whenever you like, you can just press stop and then start again and press reset. And now we have here the LDO phase mode and here we have the SNPS. Now we switch off the flash bank and have we got stop mode and then we wake up again. So up till here it's interesting for us. So we stop here now before it's go out to the screen here. So if I show you this picture here, as we said, when we started from reset, we go in and run mode with LDO operation. And then we switch SNPS and then we switch off the flash bank too. And then we go to sleep mode. But still the S1's retention is on. So we have, we will reach quite low value here, but then we wake up again from the RTC. And here we have a run mode, flash bank two is off. We have the LED driver enabled on, but not the current for the LED is not counted in this because it's supplied from the VDD. So it's outside our measurements. And then we come to the interesting part and it's about this top two mode. And here we have the SRAM4 retention. Only that one is tension and the RTC, of course. So you can see how we should reach around four microamps. And if I look into this here, we have LDO, SNPS, SNPS without flash bank two, stop mode, full retention of SRAM, run mode with LED driver on. And here comes the interesting part. And this is stop two and SRAM4 retention. So if I pick up a part here to measure, you see that we come down to around four microamps. And that's the same as we have done before here. So you can see, if you measure from the different parts, which I did for a couple of days ago, I make it with a shield and also with a DMM. You see here on the first with only LDO, we have around 500 microamps and going down to the SNPS. We go down even more than 50%. And then with the flash bank two off, we go reduced in further one, 40 microamps around. And you see here in the stop two modes with the full SRAM retention, it comes down to around seven, eight microamps. And the last stop two mode with only SRAM4, we are down to around four microamps. That's, you can play around with this, but this is a way we can do the measurement of the current consumption for the different modes with this application program somewhere. And I hope you can see the benefits from all this power modes they have on the U5. So actually I think that's, yes, we have the picture here. Yes, another step that you can add. You see that it's a little bit like a saw triangle waveform, but it's due to the slow power regulation operation. So it becomes in this way. And here you can see also about the led I was talking about. It's only the current from the MCU that's driving this transistor here. So the current from the LED goes from the 3.3 volt. So it's not measured. It's on this side we're measuring.