 We can jump to the peripheries which is dedicated for or not dedicated but use it with the motor control. Okay, we have PWM generation, we need it for that we use timers. Then if we have speed position feedback we use for that timers. It's part which is not really IP but it's linked between IPs. We have to have some multi-timer configuration that we have to react one timer for another one, synchronize them. Then analog to digital converter and then some rest of peripheries for example connectivity or internally use DMA for some transfer without the core. First one is timers. For motor control we are using advanced timer. Why we are using this one? Because our advanced timer contains output up to three outputs with complementary channel. What is mean complementary channel? For some drivers we need separate information, separate signal for high side and for low side. And there is some rules how to handle it and we have it there with up to three channels. Because we are supporting three phase motors and it's linked to us. In one part number if I remember well we have also the fourth channel with the complementary output. For example for two DCs it's good to have three, two couples for control two motors, DC motors. What is inside the timer? We have some trigger inputs. Then we have some press scalar and trigger output. Some auto-relegate register which limit the value from the top. Then the real counter. In this picture it's 16 bit. Some of our timers are 32 bit but not all. You have to look inside. And then we have some big unit with capture compare unit which can react for the inputs or use pin configuration to the output. In our case it's mostly for PWM generation outputs. For the encoder we will use input. For the F3 family we have up to three motor control timers. Name by number time 1, 8 or 20. That's advanced timers. And it's running up to 145 MHz. 16 bit different modes. Up-down with the auto-reload functionality. Compare, capture, different mode. One-pulse input capture or PWM generation. Complimentary outputs or some channels. You see that there is six blocks. It's again coming from F3 family. That we have a real connected output. We have up to four. But we have additional two capture registers. Compare registers for additional functionality. Triggering or synchronization with ADC or use additional functionality only internally. First four channels it's possible use as the output with the pin-out configuration and to as the internal. Then we have some polarity, idle state, possibility. Important it's hull or encoder functionality. Some interrupt support and DMA support and some embedded safety functionality. Safety functionality for motor control it's very important because when we generate PWM values. These lines control directly our transistors. Then we have to have some chance to avoid something. Because during our spinning motor we have to change the vector, still change the vector. If we have some problems, some error, we have to react somehow on that. For that we have standard break input. Through that we can switch to some state state. Or some internal detected faults could be that we lost the clocks of the micro. We have internal oscillator and we can compare if external inputs lost some pulses. Then we can react on that because through that we cannot recognize that motor run well and we have to react on that. For that we can again jump to some state state. And last row it's again some important part that we can lock the configuration. It's again when we rotate with some vector and when something happens with the flash memory or through some noise MI. Coming inside the micro code jump to another address and run different code. And through that it's important to don't destroy the configuration of pinout. Because if we have connected to the PWM generation and through the lost in the code you switch and reconfigure to the output. Then you open the transistor. In the worst case you open both low side and high side and will destroy your line directly. Or it can generate only static vector which is the maximum current coming through the VDD, through VBUS to the ground. And again can destroy your power stage or motor. For that it's good to have a possibility to lock the configuration. Okay then we can go deeply to some mods. We have some different kind of mods we can calculate through the setup of auto-reload register some period. I think it's clear. One good information is that we have two mods. The first is the alignment that's standard what is used or defined that some counter count up to the sum value and then clear to the zero and again up. And after some if it output or some value compare value it's over then counter then change the output generate PWM. Or central alignment that one part it's a mirror and after we go up then we return back and count down. But one maybe a bit hidden problematic is if you use edge alignment at this point when counter it's clearing go to the zero. Both output or three output if you have three phase motor coming to the zero and what is produced from the switching. Some switching noise and it's coming to the line to the air and if you use this one that's in almost cases we are in different PWM cycle at least only two can be in the same value. And for that we reduce at least two times or three times the noise which is produced through the switching. We separate it during one time during the period. That's why we're using central alignment. Okay that's some not linked to the to the motor control slide. We can generate underflow even and overflow and with this slide we can highlight that if we on every update change the value by by one then we can make some average that if you use this two cycles. The average value is N plus 0.5 that we extend the range. That's in some literature it's a name like deterring and it's possible use with simple routine on the valley or on the top. Most related it's about the update even so we have some some possibility how to how to use with this. And generate update even our specialty inside the timers it's that we can use shadow registers and shadow registers can be stored during all cycle. And through the update even we can transport the stored value in the shadow register to the actual use it value. It's good because we can send three values to the three PWM frequencies and all values it's taken at exact time use it and for that we have update even. And then last in the last row it's that we can we can play with some repetition counter and maybe next slide will be more more clear in the picture. If we have some time critical application that our interrupt service routine have to be longer than PWM frequency the MCU it's quite small powerful. Then we can use repetition counter and skip some overflow in events then we extend the time for the calculation. That's the reason why we can we can use the F0 family with 30 K PWM because we generate PWM with 30 K. But the FOC calculation it's running on the every three cycles or what is the necessary that's we can extend also quite low powerful micro but with the high frequency. High frequency why we need the high frequency there is two two aspects one is that there is switching losses. If we have higher frequency then we go to the to the high losses but for some motor mostly some low inductance motor we have to have fast fast switching. If you remember the picture from Thomas presentation then current it's not not sinusoidal that's shaking around some sinusoidal shape. If you have low inductance motor the slope of this shape it's faster and the amplitude of this peak it's higher and how we can decrease this this peaks it's only through the faster PWM frequency. Then if you have a low inductance it's mean some micro Henry or 10 of micro Henry then we have to increase the PWM frequency. Okay that's the reason that we can this low powerful micro we can achieve also drone motors with low inductance and we can spin this F0 family low low inductance motor. Okay then we have some some fun some possibility some feature about the DMA transfer in our STM32 we have some some channels and we can select what channel it's connected to the which periphery and we have to define. We have some some events from that and we can save time that the CPU cannot take care about this one only way from the DMA controller that it's done. Also we have one nice nice feature which is which also saves some MCU time and how it's work. This is three three values in output compare register for look like PWM and we have calculated value and we want to transfer what we need. We have to define that this DMA transfer start from this point goes to this address and we define that three address we will take and put it to the three different space. What is happening with the next cycle we have to reconfigurate on this side could be the same we have to define that not three values but six values. But in this site we have to change because next point is here and we have to change it to the to the first output compare register. It's take some time of CPU and we or our development team thinking about that and want to save some time for that. They develop a virtual register and our configuration will be that we will start transfer from this point with some amount of data. But we define that we will transfer every transfer will be to the virtual register and internally in the timer will be moved the value to the proper register. And the control of this transfer transfer will be done by the timer. Timer ask for the predefined number of transfer that I can define that I want to have these three values and timer generate three request to the DMA controller. And what is happen next it's continuous with next three cycle. Without reconfiguration we can define once and then we can swap between some places for the calculation as the dual buffer. Okay now we have some slide about the control mechanism is complementary output. Channel one is a direct output from the timer. We can define active level that active is high state or low state and also the same configuration for complementary output. But to avoid cross conduction that first transistor it's in this time open and I want to switch switch off. And if we switch on the low side the same time the first transistor opening quite slow. But the second one closing quite fast and in the middle there is some cross conduction and we want to avoid it and we avoid it by some delay. And for that we have some dead time generation. This time it's named dead and we have it on the both side when we switching from the active value to the low and vice versa. And this time it's defined in six 8 bit register but it's not linear. It's a good way to go to datasheet or reference manual and have a look at exact time for the exact configuration. It goes from microseconds up to some seconds. Then we have some dedicated emergency input. I a bit touch this. Now in past with all families apart from F3 we have only break input only one and F3 family has two inputs because we have two faults which is usually used. One is for over current that we want to stop the current which is coming through the phase. And second one is used for the over voltage. That's why we have now two break inputs. Then it's some table from the user manual and you see there is one bit which is more a bit and this define a safe state. Safe state it's mean if it set to the zero and in the state when it's inactive it's set to high level it's inactive. And you see some different configuration. For the six step it's used some different one than for sinusoidal control and it's done automatically. I want to highlight at this time that our safe state it's define it by three state on the output. Because we don't know what is the safe reaction and we have to take also care about the state when power going down or up. If we start your PCB or application then it's the timer it's in the reset state that's not active. And we have to define also the safe state because through the some capacitor on the line you can define active state. And for that we prefer way that we use safe states and through the external pull up and pull down you will define the safe state on your hardware on your drive. Some gate drivers usually ST drivers contains also some some quite weak resistor to pull up or pull down to the non-active state. Also ST drivers usually have protection for the cross conduction. If it's not possible configure high side and low side to the active way that's it prohibited and it's not take care about this configuration. But competitors sometimes avoid some additional logic and you have to take care about this strange state and safe. Our last implementation of this one is that we put it to the safe state but with pull up or pull down depend on the non-active state that's our protection. That if we go to the safe state we are pulled also with this quite weak because it's internal mounted. For the real application it's better put there some precise calculated pull down or pull up. Okay then it's some table above which is linked mostly for 6 step and you see some configuration. There is some additional functionality of the timer commutation event. And we can pre-define some definition bits which is here about the state that I don't know complementary output it's on the active state which is mean high level. And we can put it to the shadow register and through the commutation event we can switch to the different step. It's mostly used with the 6 step control and you see that some even change the configuration. In this case first step the T3 generate PWM, T1 it's high level and T1 it's low level. After the commutation we switch to the generation on T5 and different state. The configuration of output and it could be pre-define it in the shadow register and wait for the even that now it's commutation active. Again about the break input and possibilities about the break. As I already touched we have input from the dedicated pin and also from the clock security system. We have inside our micro the comparator that internal oscillator running on the proper ratio from the output and if it out of order then switch to the internal. Generate some fault state and on the timer level switch to the safe state because we want to avoid cross conduction or a steady vector. When it occurs clock security or something else the more bit is reset and the MOOCs propagate the proper level. Then break have two possibility how to control it. One it's used in the 6 step and second one in FOC. For the 6 step it's used the functionality that with automatic output enable we using this break input for the current regulation. That we put some analog value to the comparator and if it over the pre-define threshold then automatically stop the generation of PWM and T-cycle. And on the next cycle we will start again generate and up to the threshold of the comparator. We generate active state and again stop the and through the negative input of the comparator we can define the threshold the level of the current. That's used in the 6 step but for FOC we use break input as the real fault state and for that we don't want to automatically update on the next cycle and we want to make some reaction on that. And through the library we will receive that PWM it's stopped and we have to start the motor again because something happened over current happens. Small inhibitive protection that's a nice theme and as you know when we stop the generating field and etc. We can generate the high current and for that we have to lock some configuration. As I already touch with the configuration of GPIO that we want to use output from the timer link it to the pin or some static value we lock the GPIO. But also inside the timer it's useful to use some lock mechanism because if we change the active level of PWM then it's not good state and we can have a cross conduction. For that we have three levels of right protection and we can lock some dead time and emergency configuration that's the lowest level. Then also some polarities for example the first one we can use only for the 6 step because during the commutation we have to redefine the output state. Because some switch from the connection to the PWM then static active way or vice versa for the 6 step we can use only the first one. But for the FOC we want to fully connect that to the PWM generation and then it's good to use the second one. And for some cases we can also lock the value inside. I'm not sure that could be a different application than motor control but for some cases it could be also important to lock the value forever up to the reset. That's about small inhibitive protection and next will be about the debug feature. That's quite a linkage together. Because standard debug functionality is that you put to the some row some breakpoint and you want to know if the code jumped to this row. But what is happened with the timer if we stop the code on some row. In standard way we stop all clocking and for that we will generate the maximal duty cycle that is connected to the high side and low side and the maximal current coming through. For that we have also possibility that through the debug we can jump to the safe state. Because motor control is not able to stop and start when we want because it's continuous process. But for simple cases you can put breakpoint somewhere and through that we want to be protected that we don't destroy your motor. And for the debugging of our motor control application we have another tools you will see later. And again it's a jump to the safe state. It's mean with the generation to the safe state which is defined through the external pull up and pull down. That's the same case. Then we can go to the speed position. We have this tool to implementation encoder and house sensor. Sometimes we hear about some additional one but it's not implemented and could be in the future. But it's not so complicated build some part of the library because it's based on some functionalities with some interface. And if you swap to the different one it's possible. For the speed feedback we have nice functionality. We can have main sensor and auxiliary. For example it's possible use hull sensor and sensor less. For the startup you can benefit from the hull with the absolute position. And through the continuous spin over some small speed you can switch to the auxiliary sensor and benefit through the more precise reaction of the speed variation through the sensor less. That's the possibility. You have to do manually in the code but it is inside and you can use it. And if you have a different implementation of the sensor you can define your and use it inside. Okay, then we jump to the functionality or feature which is inside the timers. Almost all timers contains a block for the encoder. And what is inside? We have some two inputs with some polarity and edge detection and connected to the encoder interface. If you remember ball mouse, not the laser, there is implementation that there is some diodes and some photo transistors. And if you cover the hull with first transistor then we switch the state on one line. And then we cover also the second sensor and switch second line. And if we go with reverse direction then the order of the signal it's depend. And for that we can decide that if we have some rising edge on one line and on the opposite line it's some state. Then we can decide that it's up counting. And on the different line again we can have a look to the opposite line and decide that we up counting or down counting. And it's done by part for the encoding and it's automatically count down and up. We can use detection of all edges, that's a standard routine how to increase the precision that we react on all edges. Or we can react only on one line or only rising edge on both signals. That's different modes four times which you calculate all edges or counts only on A or B and that's with lower precision. In this case we can put to the autorail register the real number of the pulses or multiply by the edges per revolution and then we can read the exact value, exact position from the sensor. That's how we can use it. Then we can go to the Hall sensors and for that we have also some dedicated part to save some CPU time. And we use there some XOR function. It's three signals with the shift of 60 degree and every 60 degree we can receive falling or rising edge on one of line. And that's the quite restriction from the mechanical principle that we can receive only one change, one light can has only edge. And through that it's useful to use XOR function because XOR function propagate all changes, all one change on the inputs to the output. Then if this line change then output line change. And for that we can define that this first line first captures react on all edges. And then we can use only one line for the counting pulses or triggering, capturing for the measurement and etc. And it's easy to use them. We can also use all dedicated inputs but we have to combine it because all edges generate some commutation even with possible delay. And for that it's better to combine it on the input. All inputs has some input filter and edge detection. And you see that there is XOR it's just on the front and filtering it's coming on this side. Then important part how to synchronize timers and how it's work. As you maybe remember our timers has some triggering part and some output trigger parts. And we can combine this and define some action. From the point of view as the master we can send to another timer some signals that counter is resetted. Counter it's enable or update even happen or some output compare happen. That's what we can send out. And from the opposite view from the slave we can receive that master timer has triggered or gated or resetted or external input. We can extend the range of the timer. We can connect two timers together and calculate all update events. And then we extend from the 16 bit to the 32 or more. That's possibility. And there is some example of the modes. First it's triggering that some master send some signal that at this time we want to start count with the slave. And after this event it's enabled and we can count pauses from the predefined clock. Or gated mode we can define from the master some range between two values. And between these two values we can calculate on the slave side. Then how we connect the timers. We have a lot of chances. In this case you see cascade mode. It's mean that timer zero it's a master in the master role for the timer one. But the timer one it's in the master role for the timer two. We can cascade it. Or second possibility we can use timer zero as a master for several timers and synchronize together. And last slide it's about the commutation. That's a nice example that from the start this hardware comes from also 8 bit microcontroller. And in past we use it for the six step control. And you see that in this case we easily connect timers together. First timer timer one it's connected to the house and source through the XOR function. We receive some reset event. Every edge reset the timer to the zero. Then usually we have to take care about the shift. Because the placement of the house and source and encoder could be different. And we have to define where is the good position to commutation. And in this case we easily define some value to the timer one. To the compare capture register two now it's in this case. And from this compare event we send some trigger out through this line to the slave. And slave receive it as the commutation event. And you see that there is change the states through the interrupt service routine. I have a lot of time to prepare next state. I prepare next state downloaded to the shadow registers. And after some time when I receive again some delayed commutation event. I can apply new state. That you see that with a very small code you can define sensor at six step control. Then we can go to the analog to digital converter. As we already said we need it for currents. That's for the sensor less we use it for the reconstruction. And that's I think all. In some cases it's good to know also bus voltage. Because we implement some pores of PWM frequency. And we don't know the amplitude of PWM. And for that it's good to know it. And for the temperature it's also good to have it some over temperature protection. Or in your application you can use it for I don't know potentiometer which define the speed or something else. Okay our timers it's this slide coming from the F1 family. And in this time it's at one megahertz with 12 bit resolution. The analog it's not so changed in prove it. But some part it's changed for example the frequency. The ratio in our case it's between VDD, VDDA and VSS from 0 to 3.6 at the minimum maximum. Supply it's request some voltage. And in some big packages we can use some reference input. In some cases some customer make mistake. In all families we have some dedicated input with voltage reference. It's for the measurement that you can measure the reference voltage which is calibrated and you know the value. And through that if you measure this value you can recognize the range of the analog input. But it's not the reference for the conversion. That's the only reference one some reference value. Then we have we can have some dual or triple mode. You will see in slide after how to combine two or more ADCs. We have up to 18 channels we have multiplexer for that and 16 channels it's external and 2 or 3 it's internal. That's the reference voltage sorry jumping. And last it's that we have some some groups. You will see it in the slides later. That's the big different what I see between competitors and ST implementation. And also we have some modes that we can have a single conversion or continues and etc. There is slide about description how it's work. We can have some regular scan mode. We can define some number of measurements and put it to the some buffer to some group and controller convert one by one. And at the end switch to the top and convert again. That's the standard definition it's done by hardware. You can see that it's work on the hardware level. But due to some timing we have to also possibility that every sample on the regular group can be triggered from the timer or from the external even. But in real life we need some high priority task and for that we have injected group. And if we receive trigger for the injected group then we immediately stop the conversion of the user in the regular group. And we start sampling of the channel from injected group and at the end we return back and start with not finished conversion in the regular group. That's like some priorities in the interrupt service routine. Some it's with higher priority, some it's with lower. About the groups we have some not only that we want to sample channel one or eight. We have there also a definition how much cycles we want to sampling. That's in the correlation that's sampling mode and through the time which we use for the sampling we can receive the precision of the measurement. And you can define that some channel could be with the necessary higher priority, high preferences and we have to measure it longer time or several times. And you can define what you want. We have some restriction in some low families, basic families like F0. There is only one group and it's only one direction how to sample. There is not possible put the channel eight before four. There is only linear way but it's the restriction through the lower micro. Please take care about the sampling time because through the sampling time you can imagine that you use some internal resistance through the time and apply time for the switching. If you use very fast cycle then you have to have very strong power source. In some cases you have to use some operating amplifier with good internal resistance. For that we have also in some micro internal pumps. If you use in your application if you want to save some money then you have to take care about the resistance through the sampling time. There is block of ADC converter and you see some differences, reference voltage which is used during the conversion, power supply lines and external inputs. As you see there is some multiplexer and internal inputs. One internal input it's about the temperature. We have on chip some temperature sensor and reference input. I already said that two or three internal lines if you have family which contains LCD driver then it's also one internal line for measurement of LCD power supply. And then we have two parts for the triggering and you see that injected group and regular group have different sources, different configuration. And also it's important that there is timer one trigger output that what we already touched that every timer has some output which send some signals. But from the time we observe that we need to have more outputs from the timer and for that we have a dedicated line from the timer. Compare capture register four because we want to synchronize and for that we can use direct line and standard GPO trigger output we can define for the different usage. You have to find in the reference manual what is connected to the which one. It's not fully full matrix you have to take care about that. But it's a lot of connection between timers. Okay that's it's about the triggering and then about the outputs. From the conversion we have some output and you see that regular channel has only one data register, one 12 bit data register. But regular channel has possibility to cooperate with DMA and through the DMA you can automatically transfer all measurement from the regular group to some space in the memory. And at the end MCU receive information, hi I have all data from the conversion and it's done automatically without any take care about the multiplex transferring and you can easily calculate. With the injected channel it's quite different because it's used for different usage and we have dedicated for 12 bit registers and only interrupt routine handling. But again if we have injected groups up to four then it's easy to generate only even that measurement it's done you can take the value. Also there is some part about the clocking of the ADC. Please take care about that because there is some restriction that analog part cannot be clocked over some speed. You have to take care about this and define proper division from the main clock source. And last one it's about analog watchdog. It's a useful application in past when we haven't F3 family we have only one break input for the overcurrent and through this we can automatically convert bus voltage and define some thresholds for the overvoltage and undervoltage. And react on the very simple way without any time to make some execution of the comparison between some values. We can define high or low value and define which channel through the conversion will be used for the comparison. Could be some of input or all and etc. Let's define it and generate some requests for the interrupt. Then we continue with some dual modes. Dual or triple mode it's a combination of ADCs together and we can play with this together. One ADC it's in the role as the master and can send some synchronization sampling trigger to the second one and receive also some result that it's finished and cooperate with the data. This is example that we have two ADCs and we can simultaneously trigger it with one signal and slave could be synchronized together and after full conversion you will receive the event of the finished result. Or we can use interleave mode it's not used in the motor control but it's a nice feature on the ADCs. We can extend the sampling rate by two that we can sampling the same channel and master channel receive the event sampling the second one. Opposite one it's sampled with some delay which is in the middle of the sampling rate and we can extend sampling rate. Also we can play with the data because we have only 12 bit ADC. If we have in master dual mode then we can combine result from the second ADC together with first one and save benefit during the transfer that we use only one transfer instead of two and save some time. Ok then we have some possibility you ask for that we can synchronize on the crest or valley or bows. We have dedicated synchronized channel compare channel 4 sorry for that we can use the result and transfer through the DMA. And now it's synchronized we can use trigger output or dedicated output from the timer to the ADC to the bows ADCs or master one and then we can be some trigger head from the timer during the PWM cycle. We have some slides about GPIOs and it's year 10. So depends on the package but STAM32F3 has up to 80 multifunction bidirectional IO ports. It is standard 5 volt tolerance IOs. GPIOs current can be up to 25 mA, can toggle up to 54 MHz and GPIOs can be used as alternate function for internal peripheries. 4 IOs can be used for wake up from standby mode. This is the diagram of the GPIO so you can see two main parts output and input. If you select GPIOs as output so you can see here some push-pull transistors so you can select push-pull or open drain configuration. Here is the alternate function output for peripheries. Diagram includes also some diodes for protection and input there is analog input and trigger Schmidt for digital input. So you can select both of them at the same time and here is the register for the values and also there is include some pull-up pull-down resistors. It is fully configurable. Now let's take a look to DMA. It is standard data transfer controller so it works without CPU. It has up to 16 independent configurable channels. There are some triggers hardware and software on each channel. You can select the priorities of the DMA. Programmable size of transfer and it works with three events so you can receive interrupt for half transfer, transfer complete and transfer error. It can be set as memory to memory, peripheral to memory and vice versa and peripheral to peripheral. If you receive fault on the channel it is automatically disabled. So DMA don't occupy the bus. You can see there is some arbitration and data transfer. So arbitration is done here and data transfer is done here so there is a time for CPU on the bus. So you don't occupy the bus for all time and CPU can work with the bus at the same time. There is shown latency of two transfers. So if the data goes on the channel one and channel two receive the request, the arbitration and address computation is done during this transfer. So it saves some CPU cycles. And connectivity it is fully configurable so you can connect it to all peripheries on the chip. Let's go to embedded analog on the system. So we have operational amplifiers on the chip. On the STAM32F3 there are four amplifiers. So there is a three shunt apology, one shunt apology and insulated current sensing. All of these configurations can be done for two motors. So there are pins for inverting, non-inverting and output from the operational amplifier. It is also fully configurable. Allowed configuration you can select the internal gain. So the gain is set inside the chip but it is not so precise as the external one. So you can select external one but you need additional GPIOs for this or internal gain with filter. So you can see here filter. It is configurable in Motor Control Warbench application. Comparators, there's up to seven comparators on the chip. Three comparators are for overcurrent protection because the shunt apology needs three converters and one is for voltage fault. Comparators and amplifier use the same pin so you don't need to externally connect the additional pin. So comparator can be directly connected to break input of the timer as my colleague mentioned. And you can set the state of the transistors for the emergency. You have two break inputs so you can select overcurrent protection and overvoltage protection. Our Motor Control Warbench allows to configure these settings. So you can combine three shunt apology with embedded programmable gain amplifiers. And you can select which amplifiers can be or should be used for the motor. If you need external gain topology, seven MCU pins are needed because it is for free shunt current sensing. Because one operation amplifier share two signals and one operation amplifier is for third phase. Additional pins needs to be selected for external gain setting. So you need seven GPIOs for this configuration. It can be selected in the Motor Control Warbench in this window. So I think you will see it in our handzones. Here you can choose the pin out of this pin. Here is the inverted pin out and this pin out are not configurable. Three shunt current sensing with internal gain topology so you save some GPIO pins. Five GPIOs are needed for this configuration. Input for the shunt and outputs are fixed so it cannot be disabled in this configuration. Again the GPIO settings in the Motor Control Warbench. So you can select the GPIO for this configuration. And here you can set the gain for the amplifiers. One shunt current sensing topology is selected in the power stage current sensing window in Motor Control Warbench. And again the embedded PGA. You can select the amplifier which you want to use this linked to ADC. So one shunt current sensing external gain topology three pins are needed. So the ones for shunt and two for the external gain settings. And internal gain topology only two pins needed because we have internal gain here. And one output it is not possible to disable it. External gain topology is configurable in Motor Control Warbench. So in window here and internal gain topology as well. Dual motor control so all the configurations we have seen before can be combined for the dual motor control. So for example you can set first motor control as three shunt, second as three shunt. Or first motor control as one shunt and second as three shunt. And also choose the connection inside. There is option to shared resources. So if we have two motors we need four operational amplifier. But with this option we need only two operational amplifier. But the FOC has to be synchronized for both motors. You can select in Motor Control Warbench here. And here you can select the amplifiers and pin out. So settings of comparators in Motor Control Warbench. So if you choose the embedded comparators in the face current feedback. We have seen the settings of these comparators and you can select voltage threshold of your system. And it automatically compute the current threshold. So it takes the parameter of your power stage and compute it automatically. Overcurrent protection so as I mentioned comparator and amplifier share the same pin. So if the overvoltage occurs the comparator trigger the timer break input and it stops the system. Overcurrent protection settings in Motor Control Warbench. So you can select internal voltage reference. So you can choose internal voltage threshold for comparator. And again it automatically compute the value of the current or external voltage reference. So you need additional GPIO and connect voltage reference to this pin and DAC channel. So you can connect this input for DAC and configure DAC to the value. Overvoltage protection it is the same so you can select internal voltage reference external one or DAC channel. And it computes the voltage threshold value automatically from this window.