 So, how do you get started with the STM32 family of devices? In this section, we're going to have a look through the structure of the STM32 part of the website to see which documents and software and tools and that are available. Then we'll have a look into these documents and see the structure of the documents to show you which parts of information are stored in which of the documents. We'll also show you the MCU Finder. So, the MCU Finder is a utility that is either on the PC, Android apps or iOS applications to help you select which STM32 is best suited for your requirements. And then we'll have a look at the hardware that actually sits around the STM32 so that you can get the device up and running. So, we'll have a look at the information source first. So, there are different places where you can find information on the STM32. So, there is the STM32 web page which is www.st.com.mcu. That will take you to the microcontroller web page where you then select which particular family of STM32 you want to have a look at and then slowly move down until you actually get to a specific device. We have the ST communities. The ST communities is like the forums and this is where engineers post questions. Our engineers out there provide tips and hints about how to do various tasks and these forums are monitored by our team in Tunisia and the team in Tunisia are also the team that write the full application notes and do all the validation testing of our STM32 devices. So, we have quite a detailed knowledge team supporting these particular forums and answering questions based on what's submitted by people out there who are designing with STM32. Then we have the STMCU finder application. So, as I said, it's the PC or tablet phone version and this is where you can use the different slider bars on the left-hand side to select memory sizes, IO counts, tick boxes for various peripherals and the list in the bottom part of the main screen will slowly get smaller and smaller and eventually you'll probably get a few devices and you can see then based on an approximate 10K volume pricing which would be the most cost effective for your application. Also once you select a device, the blue toolbar that you can see just above the big list will then get populated and you can quickly click on links to the data sheet, the reference manual, application notes etc etc directly from the MCU finder itself. So, we now have a look more closely at the STMCU website. Once you've decided on a family like the STM32F0 series family, you will then get a list of all the features that are common to all the sub-families in the F0 series and then which features are in each of those specific sub-families. So once you've decided, looking at my slides there, that you wanted the USB features, so you've selected the USB line of families, then you move to the next screen where you can see the different pinouts and memory size combinations that are available for that particular sub-family. So on our USB line, so the F0 X2, you can see that we've got 28 pins QFN or 20 pin TSSOP all the way up to 100 pins BGA or QFP and memory size goes from 16K up to 128K on this particular family. So once you know how many pins you're going to need, you select which particular sales type you've got there and then it will actually take you to a specific product page. So this is the product page for the F0 72RB. So this is the component that is on the nuclear board we will be using for the hands-on. And right at the top of that page, you can instantly see there is a link straight to the datasheet. So you can instantly, from the top of this page, view the datasheets. If you scroll down, you can then see all the particular key features which are also on the front page of the datasheet. And eventually you'll get the block diagram. So this looks very similar to the diagram I showed you in the introduction and it shows you all the different component blocks for analog, connectivity, system functions and the memory functions and things like that. So that's part of the web page so you can instantly see quickly in the block diagram what features are in this family of devices. Remember, this is the RBTX package. So as you go to some of the smaller packages, not all of these features are going to be available in the smaller packages due to pink count limitations. As you scroll further down the web page, you'll eventually reach the technical documentation section. Here again, the first item of the technical documents is the datasheet. Beyond the datasheet, we have got application notes, technical articles, reference manuals, hot programming manuals, a router sheets, hardware and CAD models and libraries and then some presentations for general marketing for this particular family. If you have the particular application notes, some of them are dedicated to this particular family. So things like AN4067 calibrating the RC oscillators and some of them are just generic ones for all STM32s or all ST microcontrollers like AN1709 which is EM design guide for ST micros. So as I say, some are specific, some are for sub-families and some are for generic MCUs in general. If you carry on down that web page, the next part you get to is the tools. So you can then see the hardware development tools. So you can see the ST link, which is our USB to JTAG programming dongle. Then you'll see the evaluation boards. So these are discovery boards, nuclear boards like the one you have in front of you and eval boards. So all the different documentation for each of those boards are behind each of those links on that screen. Beyond the hardware tools, then you get into the software tools. So this is where you find STM32 Cubamex. This is where you'll find the virtual comport driver, the Eclipse plug-in for the Cubamex and so on, so on. There's lots of different software tools available out there for each of the microcontrollers. And then finally right down at the bottom you've got the information about pack quantities, the size of the packages, the unit price again, same price that's in the STMCU Finder. And then we've also got the materials declaration for the quality side of things. So if you're doing your packaging up your project, you need to know what type of eco information is available for Rosh compliances. So we have the documentations of that information right at the very bottom of each product web page. The STM32 community pages, as I say these are the forums that we have for the STM32 family. And this is where you can post questions, search for tips and tricks, things like that. And this isn't where you will probably find information about simple questions that you feel a bit embarrassed to ask. So there's one there on that side. Do I need a pull-up required for the USB D plus line on an STM32? So there's very small questions, tips and tricks that other engineers have asked. We've answered all other engineers have answered and we've validated those answers. And it's a quick way of finding some information. The information actually most of the time is in the documentation, but there's a lot of documentation to read for some of these families, especially the bigger devices like F7 based devices. So the ST community can be a quick way of finding the information out very, very quickly. So please have a look at the ST community pages for the STM32 family. The MCU finder, as I say, is the tool that we use for narrowing down our selection. You can see there from that screen capture, we've got over a thousand different sales types available. I think it's now nearer to probably about 1,200 sales types today. And you can select which peripherals that you require from the tick boxes or the quantities of down in the bottom left-hand corner. You can use the slider bars to narrow down memory sizes or pin out sizes. And you can actually specify specific families further up on that left-hand side of the screen. There are two options for the MCU finder. You can actually have it so that it downloads the documentation as you request it. So when you click on any of the icons on the blue bar in the middle of the screen, so for block diagrams, data sheet, docs. Or you can ask the tool itself to download all documentations. So if you go into the settings button, as you can see on the right-hand side of the slide, you can actually then configure the PC. It's only the PC version, by the way, this so that it will actually automatically download all the documentation to your hard disk so that you've always got them available to you when you need them. Now we're going to have a look at all this documentation I keep talking about. So we've been mentioning it, where to find it on the web page, that you can download it from the MCU finder. So we're now actually going to show you what the different types of documentation are and what's inside each of these particular documents. So the five key documents that you'll probably need at some point during a design are listed there on the slide. So we'll go through each of these documents so that you can see what's inside each document and how each document is structured to speed up your process of finding what you need when you're doing your design on your STM32 device. So we'll start with the datasheet. So the datasheet for most STM32 devices is about 200 pages long. So it lists all the key features, exactly the same as you have on the website. So it covers all the minimum, maximum memory variance for this particular family that this datasheet covers, voltage ranges, what peripherals, key speeds of some of the peripherals, number of timers, things like that. Which packages are available and the physical dimensions of each of those packages. Most of that will appear on the front page of every datasheet. As you move through the datasheet, you'll get a bit more description of these features. Then you'll get to the pinout information. So here we have a picture of each of the different pinouts and the numbering as it goes around the package. Then after each of the pictures, you will then get this summary table, which then tells you the pinout number, what the pin function is and any alternate functions that are available on that particular pin. So if I take something like PC2, which is not available on the 48 pin package. Only becomes available once you hit the 64 pin package. And you can see that it's ADC channel 12. And it's also SPI2 myzo pin and I squared 2S MCK pin. So it does multiple functions as do most of the pins on the STM32. As you carry on through the documentation, next section you will come to will be the electrical characteristics. So this tells you information for max operating conditions, runtime current, sleep currents, things like that. Some of the timing information for the serial comms and the power supply scheme like you can see there on the slide. So there's lots of information in the electrical characteristics section of the device. Then finally, at the back of the document is the mechanical information for each of the packages that this STM32 device comes in. So you've got all the mechanical diagrams to help you with your PCB layout. Probably the most important document you're going to use is the reference manual. So the reference manual is about 1000 to 2000 pages long, depending on which device it covers or which family of devices it covers. And one of the key areas that we'll be using for the first hands on is the memory mapping. So when you create your first project, if you're not using any libraries or structured information, you will need to know where in the memory array each register is located so that you can write information to each of those registers. So all that information is actually stored in the memory map, which is in chapter two of the reference manual. And we break things down into boundaries addresses. So you can see there that GPIO port A is sat between boundary of 48 million hex to 48 million free FF hex. So it actually has one kilobyte of register space assigned just to GPIO port A. And when we refer to the registers, when you get further into the peripheral parts of the descriptions, we define this boundary address plus the offsets. So this boundary address or the first element of the boundary address is going to be an important number when you're actually coming to do in some coding with an SDM32 if you're not using any of the library structures where everything's predefined for you. As you go through the reference manual, you will get a chapter on every peripheral that's in the particular SDM32 you've got. And the first section is usually the block diagram of that peripheral. So you can see exactly what physical pins that are for this peripheral and what the internal logic of that peripheral looks like so that you can understand is this going to do what I need it to do. So you've got all the block diagrams of the individual peripherals. Then as you carry on through the specific peripheral chapters, you will get an explanation of how each of these features of a specific peripheral are working. So here we can see what happens when the end of conversion sequence flag gets set. So you get a description of actually what's going on, which register the flag is in, what's then available in other registers like the data register and how you go out clearing that particular flag. And usually you'll see some form of timing diagram there so that you can get a better graphical representation of what's actually going on in each of those peripherals. At the end of each peripheral chapter, we've got the register declarations. So here you will see each of the different registers that we have available. So this one is the GPIO-MOD-ER register and you can see there it has an address offset of zero. So that means you can see that based on that boundary address from the memory map and the offset, you know exactly what register address this particular MOD-ER register is sat in. And under each of the registers, you've got the bit definitions. So you can actually see what bits, combinations are available to go into that particular register and what each of those bit definitions does. And that's the same for every peripheral that we have on the SDM32. The next useful document is the errata sheet. So the errata sheet is published so we don't hide it and it covers all the information about what we've found or what engineers like yourselves have found about the devices that doesn't quite match what we specify in the data sheet. So the start of the errata sheet will give a nice summary of all the different limitations that are available and on which silicon revisions each of these limitations are there. And then if there's a workaround or if they've been fixed. So there where you can see the gray boxes with the dash on, that means they have been fixed in those particular revisions as silicones. P means a partial workaround. A means a normal workaround, a full workaround. And N means that there's no workaround available. So sometimes it's not possible to fix all the issues that we find in the device but normally we will find a workaround for most of the issues. Then as you progress through the errata sheet, you will see a full description and the workaround that is available for that particular issue that's documented in that summary sheet. So you can see there in chapter 2.1 the wake up sequence from standby mode. You just have to actually do things in a particular order. Otherwise, things do not work as you expect them to work. Another document that you might use, you don't always use this document, is the core programming manual. So the core programming manual goes more into the arm elements of the STM32. So the actual cortex core structure itself, the debug module, the NVIC, things like that. So some of the registers for debug modules and the NVIC, all their bit definitions are included in this document and not in the reference manual. So sometimes you will have to look probably for the NVIC information. You might have to come to this document. But these are normally updated by ARM. There usually is a version on the ARM website as well for each of these cortex cores. This is the specific ones that we've imported into the ST domain for you to make your life easier to find these documents. After the core structure and the registers, then we go through the assembly instructions. So we'll play around with some assembly instructions in the first hands on to prove that you can use assembly on a 32-bit architecture. If you choose to, if you have a routine that has to be that timing critical, then we can run assembly instructions. And there's a detail of every different assembly instruction available for the Cortex M0 core. And then further down the document, you will find all the fault handling. So all the interrupt structures, ST define the peripheral ones, but ARM define the core level ones. So there's certain interrupt routines that are part of the Cortex core. So these are documented inside the programming manual. And it's mainly for fault handling. So if you get hard fault or an NMI interrupt, things like that. So it's very useful document. Normally, as I say, you won't need it unless you encounter some issues or you need to do something with assembly instructions. Then finally, the last section of documents you'll probably use a lot is the application notes. As I say, there are plenty of them there. I think there's probably about 20 or 30, 40 actually for the F072 available. As I say, not all of them are specific for the F072. Some will be the generic ones. But it's a great way to find out how to do certain tasks, sort of configure certain peripherals like timers. But one of the key documents that you will need and probably find very, very useful is AN4080, which is getting started with the hardware. So this is a hardware getting started guide, which is a very useful document to get you up and running fairly quickly with your chosen STM32. There should be one of these documents for every STM32 family, obviously different AN numbers, but this will be the perfect document to get you up and running with any STM32 that we have in the portfolio. So the hardware getting started. So what do we actually need around our STM32 to get this device up and running? So you've got the pinout diagram there. So that's a screenshot from our CubeMX tool. So what componentry do we need as a minimum to get this device up and running? So we can see power pins. So what would we need on the power pins? So decoupling capacitors are going to be needed. So we have one, two, three, four, five power pairs there shown on the diagram. Is it the same decoupling for each power pair or different? So what would have would be usually one capacitor per power pair, and then usually one larger reservoir, capacitor for the whole board. So normally you would need one, two, three, four, five, five, probably 100 nanofarads and 147 microfarads as an example to cover all the power pins, is it there? So then we've got a VBAT pin as well. So what do we need to do with the VBAT pin? The VBAT pin we would treat as a normal power pin. So again, you'd normally have it connected either directly to VDD or decoupled with VBAT to ground to again treat it as a standard power pin if you're not using a standalone battery on the VBAT pin. Reset, do we need to do anything special with reset? So with a reset pin normally you'd need some sort of control circuitry, so an RC network to give all the power lines time to stabilize before you release the reset pin. So normally you'd say an R and a C. The STM32 has a built-in pull-up, so all we need again is another capacitor external to actually configure our reset pin for the STM32 device. Finally the other pin that's highlighted in yellow there is the boot, or boot as it says there on the screen capture. So that's our boot zero pin. Has anyone know what boot zero pin does? Okay, the boot zero pin is selecting our hardware configuration. So where we are going to start executing code from. So in conjunction with the option bytes we will either start from main flash, system memory where we have inbuilt boot loaders or we can actually start from SRAM. So you've got that configuration option available to you depending on what you need. So this is what we say is a minimum requirement for our STM32 to get started. So as I said you've got 100 nanofarads per power pair and one 4.7 micro farad it says there, so one 4.7 micro farad in the top left corner of the screen. If you notice though there is a second 4.7 on the right hand side of the screen. This is because we have a separate VDD IO ring for a group of pins as you can see highlighted in the purple color. And it means you can run different peripherals with different voltages on that side. So that side has its own reservoir cap as well as the 100 nanofarad general cap on that particular set of power pins. The analog power pins will again depend on what you're doing with the application. So again we've got a reservoir cap and the standard 100 nanofarad cap there. Again depending on what smoothing you want and stabilization that combination on the analog pins will potentially vary depending on what you're doing in your application. But typically all you need to get this device up and running is a handful of capacitors. All you need to get up and running. Remember the clock sources, we've got a high speed internal and a low speed internal clock. So you don't actually need any clock sources for the SDM32. All this is documented in AN4080 which is the hardware getting started guide. So you can see more information about the hardware that's required to get the device up and running. Once you've got the device up and running you need to program the device and then debug your software. So on the Cortex M0 cores, we don't have full JTAG. We have what's called serial wire debug. And this is a two pin interface. So we usually still use power and ground as well. So it's normally a four wire interface that you'll have connected from our ST Link programmers which you can see pictured at the bottom of the screen to the target board. You also have the boot loaders which are built into the system memory which is the UR, SPI, I squared C and DFU or USB boot loaders. So they're available to you or you can have your own proprietary boot loader installed as well. Your proprietary boot loader has to sit in the main flash though. So you have to do a bit more configuration of your code when you're using a proprietary boot loader. In the option bikes, there are ways so that you control what peripherals do in low power modes. So you can actually say you want to freeze the timers, the watchdogs when you enter low power modes or you can trigger them so that the generator reset if you hit a debug breakpoint of some sort. In serial wire debug, you get four hardware breakpoints and two data breakpoints. So you don't get the full complement. As I say, it's not JTAG. You just get a subset of the debug features that are part of the normal JTAG. As I sit at the bottom of the screen, you can see pictures of our USB to JTAG dongles. So these are the ST Links. The one in the middle is the isolated version. Left and right is ST Link version two. Integrated into all the boards of the newer devices. So the top half of your nuclear board contains the ST Link debugger. It's integrated into your discovery boards, usually at the top where the USB power cable comes in. And on all the newer eval boards, again, ST Link is embedded inside all the new eval boards. So to get up and running with any of our target boards, you don't need a separate debugging tool. It's always integrated inside the tool. So, you've now seen where to find information on our webpage and the structure of our webpage. You've seen all the different documents that we have and how the documents are structured to show which information is inside which document. And you've seen a quick view of our MCU Finder to help you select best fit SDM32 for your application. And you've also seen the minimum components required to get an SDM32 started. So hopefully now you're in a position to see what we can do to start designing a project with the SDM32.