 OK. Let's now have a look at the STM32-L4 architecture. So what we're going to see in this section is the internal structure of the STM32-L4. All the key features and system blocks that make up the STM32-L4, including all the peripherals, and you'll see an overview of the capabilities of the STM32-L4. The STM32-L4 series of devices, even though it's defined as L for low power, the biggest feature of the STM32-L4 is it is a high-performance device. The core that's inside the STM32-L4 is the ARM Cortex-M4F. It's got all the features that go with a Cortex-M4 core. It's got the very complex bus matrix with instruction bus, data bus and system bus. It can do SIMD instructions, so the single instruction multiple data functionality, and it's still got the same 12-cycle interrupt latency as all Cortex devices have. So inside the core, if we look at the main system blocks connected for memory, you can see that the 1 megaflash, or up to 1 megaflash, is connected through the ART accelerator onto the instruction and the data bus. The SRAM is split into two different blocks. Both of these blocks can be accessed from the instruction and the data bus, and all of these blocks of SRAM have 4 bits of parity inside as well, so that you can do the integrity check of the RAM. As well as the main 1 megaflash, we have a section of OTP memory for storing serial numbers, calibration values, other items that you might need permanently to be remembered inside the system, and it also covers the system memory, which contains the system bootloaders for the STM32L4. Down at the bottom, we also have now on the external memory bus, we have the NOR, NAND, PSRAM and SRAM, so all of these sit on the FMC, and separately we have a new interface on this device, which we'll explain later, which is the Quad SPI, so this can provide us access to serial flash over the Quad SPI interface. As the Cortex M4F is a master on the bus, we also have two more masters, which is DMA1 and DMA2. Each of these DMAs has seven independent channels inside the DMA structure so that we can get fast transfers from peripherals into any of the RAM or other memory devices on the bus. As you can see from the bus matrix, there is a connecting dot between all the DMAs and all the different types of RAM, so any peripheral can send information into or out from all the different types of memory that's available in this STM32L4 device. The last two items that sit on the bus matrix are the high speed peripheral bridges. So there are two of those, there's high speed peripheral bridge number one, high speed peripheral bridge number two. Peripheral bridge number one is connected to the two independent peripheral bridges which are then split across all the various peripherals, timers, UARTs, SPI, I2C etc. Peripheral bridge number two, high speed peripheral bridge number two, is dedicated to just a small handful of peripherals which is the ADC, USB, GPIO and for the devices that contain encryption, the AES encryption cell and the random number generator. Again, as I said earlier, because the DMAs can send information from any peripheral into any memory location, both these high speed peripheral bridges are connected with the dots on the bus matrix so that they can be linked to any of the memory locations on the device. Clock sources for the STM32L4 are large. We have multiple different clocks available as input sources and we have various parameters that can be set for each of these clock sources. By default, we will always start with the MSI clock, so the medium speed internal or multi-speed internal oscillator. So this can go as slow as 100 kHz but up to 48 MHz. The default from reset of this particular clock source is 4 MHz. The precision of this clock source across the whole temperature range is plus and minus 3% and the start-up time of this particular clock source is approximately 2.5 microseconds for this clock. That is the reason why it is the default clock source. Then we have multiple other clocks available. So we have the two high speed clock sources, HSE and HSI. HSI is the internal RC, 16 MHz. Start-up time for this one is about 3.8 microseconds, so again slightly longer than the MSI. But with this one you have plus and minus 1% tolerance across the whole temperature range that's shown, so 0 to 85 degrees. HSE is the external crystal, so we can have an external crystal of somewhere between 4 and 48 MHz. The resolution or precision of this crystal will be down to the external crystal that's attached, but you can get plus and minus 0.01% or 100 parts per million available depending on what crystal you've used. The downside or the negative of having such a high precision external crystal, your start-up time is slightly longer now, so you're up to 2 milliseconds for the start-up time. All of these high speed and MSIs can use the PLL, so the PLL is technically another clock source. The PLL can give you anything from 2 MHz up to the maximum 80 MHz that the device can go at. The set-up time or stabilisation time of the PLL once you've started the device is about 15 microseconds. If you wanted to use any of the clock sources up to the maximum 80 MHz, you will first have to calculate the time that it takes for that particular clock source to stabilise, then you will need to add the stabilisation time of the PLL on top of that clock source. Then, finally, we have the two low-speed clocks available. So we've got an LSI, which is the low-speed internal RC. This runs at 32 kHz, not the most accurate clock source on the device, at approximately 10% tolerance, and it's not the fastest start-up time, 125 microseconds. But it is one of the lowest current consumptions clocks available to you on the device. It's fantastic for running any of the low-power features of the SDM32 L4. Then, the final clock source we have is the LSE. This is the external 32.768 watch crystal. Again, the tolerance or precision of this device is excellent, so 20 parts per million. It's a very, very good clock source for the real-time clock of the device, if you need to keep very accurate timings inside the SDM32 L4. But this is one of the clock sources that you will start once and never switch off again. This settling time of this clock source is about two seconds. So this is something that you will set up right at the beginning, and then that will then always run probably for the lifetime of the battery or the device, if you're using anything where real-time clock source is needed. This LSE is also used because of the accuracy to configure the MSI when it's in PLL mode. So this is where the internal calibration of the MSI comes from. It comes from this external LSE at 20 parts per million. So what debug do we have available on the SDM32 L4? All the debug dongles that we have, so stlink, cowu link pro, the IARJ link, are all available to use on the device. You can do it through the programming, debugging and code analysis. So all of these debug environments can do programming and full code analysis. They do the basic debugging features, and if you have things like the U-link pro or the J-link pro, you can do the advanced features that use the embedded trace macrocell, which is part of the Cortex M4 core, to help you identify very in-depth bugs that may occur in the application as you're developing your product. One of the niceties about all these debug tools and some of the third-party PC applications, these are very good for doing code coverage and code profiling. So all these debug tools are available to do all these extra PC application-based support.