 Within this part, we will discuss a bit about 3R2S configuration. Most of the configuration parameters are set within 3R2S config.h file. It is a source file, which is one of the key components of the operating system, and those components are completely independent on the platform. The most important parameters you can see right now on the screen, so the first one is config use preemption, which is defining whether our operating system will work in preemption mode or cooperative mode. We are describing the difference between those two in next parts of this training. The second component is about the clock of the CPU given in Hertz. It is automatically set by stn32-cubemix, what you will see later on. Then we've got a tick rate in Hertz, so how often our context would be switched. It is in fact configuring one of the timers, in our case it will be SISTIC, to generate an interrupt, which would trigger the context switch, so the switch between the tasks of the operating system. The next parameter, very important one, is number of the priorities we will use within our application. Then total heap size is defining how much memory we will have within the RAM to store the information about our operating system components, each variables. So the tasks, semaphores, queues, mutexes, software timers, all of those components require some space within the RAM memory to store the temporary variables, to store its configuration, its parameters. All of those must be allocated somehow on the RAM memory, and it is done within this heap size dedicated to the operating system. What is important is that this total heap size is given in bytes, once the other components like the stack size of the tasks is given in words. Please have a look on this. It is quite well visible within the stn32-cubemix application, but if you would edit this fr3r2sconfig.h file manually, please be aware of those differences. The last two components are related to the interrupt priorities to configure the system in such a way that operating system will not negatively interact with the hardware or the other parts of the embedded system. So the first component, config library, law was the interrupt priority. It is in fact the lowest interrupt priority, which is available in our system. In Cortex-M for implementation done with an stn32-l4 devices, which we are using in this training, this lowest interrupt priority is 15. This level of the interrupts would be used by the interrupts which are responsible for the context switch. Then the next component, config library, max, Cisco interrupt priority is the highest interrupt priority, highest number, which would be used for the interrupts, which needs to execute any of the function from the operating system. So if we set here, for example, 5, it means that all the interrupts, which needs to execute any of the operating system functions, must have its priority set between 5 and 15. So this between this max, Cisco and lowest interrupt priority. Interrupts with the priority, which has lower number, so in fact higher priority, so 4, 3, 2, 1 and 0, would be completely independent from the operating system and would be not blocked by the operating system in any context switch location on any critical sections which are used within the freeR2S. Let's have a look on other config parameters important within the freeR2S system. I came back to STM32CubaMix, so we can see all of the parameters from our freeR2S.config.h file here. So it's much easier to manipulate on this graphical interface. So we already discussed about the preemption, as you can see the CPU clock in Hertz is given by the tool itself. So it's automatically generated using the information from clock configuration from this application. Then the tick rate is given in Hertz, we can change it. Right now it is 1 kHz. Then maximum number of priorities is set to 56 and it's constant. Then we've got a minimum stack size and please have a look. This number is given in words and it's used for the task creation. If you create a new task, it will have by default this value 128 words as stack size. Then we've got a maximum task length given in signs. So we've got 16. Then we've got some components which can be used within the application. So as you can see most of them are right now enabled. It has this drawback that enable additional functionality will increase the total size of operating system of the code which we would generate later on. From the most important parameters which what we need to discuss now is a memory management setting. As you can see right now we've got a memory allocation set dynamic on static. Most of the operations will do as a dynamic memory allocation. The next component is a total heap size. So this is the total memory which would be allocated in RAM to store the variables, to store the local data of each operating system component. And as you can see this time it is given in bytes. So we allocated 3000 bytes for the heap size of the operating system. The next point is a memory management scheme. By default it is heap 4. We can select heap 1, 2, 3, 4 and 5. We've got a dedicated part within this session about those memory management schemes. Then we've got so-called hook functions which are used during the development phase which allows you to monitor the behavior of your application which is using the FreeR2S. Below you can see the runtime statistics which are used as well during the development phase. Coroutines, this is the mechanism which is used within the FreeR2S when you are using this system with smaller microcontrollers 8, 16 bits. So as you can see these are disabled for Cortex-M devices because we are using full-size tasks not coroutines. Below you will find software timer definitions which are by default enabled and the interrupt priority levels we already described. So this is the first part concerning the config parameters. The second one related to this one is in the next tab is called include parameters. This tab allows us to disable or enable the function which would be included into our FreeR2S implementation. So we can add some additional functionality to our system if needed but we should remember about one important point. If we enable some of those functions the total code size of our application will be much bigger. It can be much bigger because all of those functions contain some part of the code. From the most important components, the functions which are present here I could name for example task priority set, task priority get which allows you to manipulate on the priorities of the tasks. Then task delete which allows you to delete unused task if needed. Then we've got task suspend which is blocking the task for some time. And then task delay which is switching as well the task from the running state to the delay state for a given time. So you can see much more of those functions. Most of them would be described in the further sections of this training. So as you can see within the STM32Q MX application you can define all the configuration for the FreeR2S system. All what you will set here will be stored later on during the code generation within the FreeR2S config.h file and you can manipulate on this file manually later on or you can use as well this configurator to make any modification and regenerate the code. Thank you for watching this video.