 Welcome to this video about STM32 Cubamix Pinout Conflict Resolution. We have seen together how to do basic pinout configuration for a GPIO or an IP. But usually, a project could allocate all the pins of selected MCU. And in this case, you will probably face some conflict during this definition. In this video, I would like to show you some functionality which could help you. Like the help bullet, the signal pinning and pinning, the pin stacking, and some various possibilities to reset or export the current pinout definition. Let's start with the help bullet. In this project, I defined four pins as GPIO output. Doing this implies some limitation in the allocation for the other pin. Let's have a look. If I expand all the categories of the IP, I can see some of them with a yellow triangle or red circle. If I put the mouth on this one, we can see the status. Path-disabled, conflict-with, PN9, GPIO, and P8N, PB6. If I go in the configuration of this timer, I can see which functionality I will see are not possible. Again, I can put my mouth on this yellow warning. And I've got the detail. P8N and PB6 are already booked, I will say. If I remove the configuration on PB6, for example, now the partial conflict disappears. It's a way for you to identify which pins conflict with which pin. I will set it again. Now let's have a look at the user art. This time it's red. That means you can't configure user art at all. No moda possible. In fact, what I have done, I just defined as GPIO, put all the pins that could be the RX on the takes of the user art. So again, if I just modify this one, for example, now it's partial. That means I can at least have a single way of half-deplex because I release a pin which could be a user art one takes. So this is how you can identify the limitation on the potential conflict between your pin configuration. The last point I want to show you, you have seen you can select USB device. And again, if you put the mouth, you will have this message. It was the middleware. And in fact, it's active only when the USB OTG FSIP is configured. So in this case, it just tells you what you have to do to be able to select this one. So you go in the USB full speed as device. And this time now I can select this one. Signal pinning and pinning allows to configure STM32 Cubemix to solve pinout conflict by itself. If I come back with my example with 4 GPIO output defined on the conflict with the user art one, which can be configured at all. We can see that on each pin, we've got this pinning symbol. That means we don't allow STM32 Cubemix to reallocate this GPIO output to another location or another pin. But I can remove this configuration. For example, I right click on it and you've got signal and pinning. That means we allow STM32 Cubemix if you don't find any solution to move this GPIO to another pin. The same thing for this one, for example. And now you can see that user art is completely selectable, I would say, and configurable. I can now put in asynchronous mode and automatically the two GPIO outputs that have defined on those pins are moved to another location. In the case of GPIO, there is many possibilities. Just take the two first ones. And now I can say, OK, this one is now signal pinning. I don't want any reallocation if I've got conflict on such kind of things. So it's a way that you will indicate to STM32 Cubemix if it can move a signal or not. Let's see now the pinstaking functionality. This one allows you to assign more than one signal to one pin. So let's imagine now we've got PN9 has a GPIO output. PN10 has a GPIO output. So each time I do a left click on the pin, select the configuration. And now on the same pin, I want to have the user art functionality. I mean the GPIO output is user art boot time and after this pin will be reallocated and used by the user art. This could be done with a right click with pinstaking. Pinstaking and now, as you can see, I can select user art takes to the same thing on the pinstaking for the PHM. I can select user art RX. And now if I activate the user art connectivity, user art 1, and now I can configure it as asynchronous. If I left click on it, I can take the functionality. So user art RX configuration is done. The associated initialization code will be generated also. Warning, this functionality doesn't generate any initialization code for GPIO functionality input, output or analog. But this is really a way to book on the same pin more than one signal. To remove the pinstaking, you can do it because you've got more than one configuration for this one. So if I just remove, for example, the GPIO output, now I can remove the stack. Pinout menu. So in this video, I would like to review together the pinout menu. If I click on it, we can see some undo and redo mode. So Ctrl Z, Ctrl Y, as usual on many applications. Then we've got an option to give the current signal placement. That means it will fix the allocation despite any future conflict during your configuration. But this could be done also thanks to the pinning and pinning configuration we have seen in a previous video. Then we've got an option to show the user label or to hide it. So for example, here I created a label LED1. If I untick this, you can see just a GPIO now. Let's keep it this one. Then we've got different functionality to reset somehow your configuration. Disable all mode will disable all the peripheral and middleware. That means anything which is not a simple signal like a GPIO. So if I doing this here, only the user to want configuration will be removed and the LED and GPIO output will be kept. As you can see, here it just disappear. If I do a Ctrl Z, then it's configured again. Other possibility, clear pin out, it will clear everything. If you want to start again your configuration and you are somehow lost, you can do this. If I do a Ctrl Z again, I come back to my example. Clear single map signal. It was this orange signal. When you configured a signal for an IP and you don't configure the IP, as you can see it's in orange. That means it's not fully configured. And you can just clear this one or all the pins that are in such configuration. So in this case, you can see all other stuff is not, I would say, impacted. Again, Ctrl Z. Then you've got a pin signal option. This one is quite useful because it lists all the pins that you have configured and you can pin them and pin them in some list way, I will say. You can add the user label on each pin, and it's more convenient than just clicking on all of them. So for example, Curm Erics 2, Curm Ticks 2, and Apply. And here you can see a change label for all the things in a single menu. So it could be quite useful somehow. List a pinout compatible MCU. Quite useful functionality also when you do some porting tasks because it will list for you all the compatible MCU or with some restriction. I won't go into details about this because it will be addressed in another video about the porting task. So just know it was there and you can play with it. Quite simple. You can also export your pinout with ALT function or with ALT function. It was just exported in a CVS file, and you can open it with Excel and just share with anybody the pinouts that you have defined. Get and use GPIO. This one is quite useful. For example, you finish your design and all the unused GPIO want to configure them in analog mode. The purpose of this would be for power consumption because analog mode will deactivate the Schmitt trigger of all the pins. So it will be a gain for the power consumption. So I will do it on all the pins that are not configured. As you can see, it's automatic. It can finish the initialization code for you. It's less readable for sure. I can reset what I've done. Sorry, I forget to say that I want to do it on all the unassignal pins. I come back to my configuration. What do we have still? The pinout view color. Do you remember I already told you about this? It was the meaning of all the color that you've got for the pin, if they are well configured or if not. You've got detail about this. And to finish, you've got a layout reset. This is when you are a little bit lost in your configuration. I don't know you hide many things. You are moving from one thing to another. You are somehow lost. Just do a layout reset. It will put everything in the default mode. Not from the pinout point of view, but just for the way that Cubemix shows you the information. And that's it what I want to show you in this video. Thanks for your attention.