Can the SimpleFOCMini EN pin be set to high permanently?

I’m trying to save pins on my MCU and noticed that the EN pin of the SimpleFOCMini is not used much in the library. Can I set it to high permanently?

Yes, you could tie it high using a resistor and use the MCU pin for something else :slight_smile:

The implication is that the driver can’t be disabled any more - it will always be connected to the power supply, and you won’t be able to switch the phases into Hi-Z mode.

1 Like

But SimpleFOC doesn’t use the High-Z mode, does it?

It does for trapezoidal commutation, which is not often used, and also when you disable the driver.

With no EN pin, the driver cannot be disabled, so then the phases are either switched LOW (which will brake the motor) or they are switching.
It depends on your use-case. For some applications, it is not important to have access to the Hi-Z state.

1 Like

@runger , I recently came to the conclusion that setting EN to high permanently is very dangerous. More explanation in this thread:

Yes, its true. If the EN pin is permanently high, the driver is always on. This can be dangerous, as you have found out.

However, if you look at the datasheet for the DRV8313 which is the driver chip used on the SimpleFOCMini, then you will find that the INx lines are actually pulled low internally:

So in actual fact, if the pins are just floating, they should be pulled low by the driver. So I think that in your case there may be more than this going on, and the pins you’re using are actually being driven high in some way by the MCU.

1 Like