Protection state
The following variables are located in the /driver
folder.
stat
This value can be regarded to as a warning indication. Non-zero value signifies that a protection was triggered, but the condition is recoverable and will go to zero again once the issue passes.
If any of high-priority limiters is active or, a warning is raised, driver flag status word is non-zero. It means that controller is protecting itself from damage.
Driver status word is also non-zero in some cases of hardware fault. Each bit of driver status word represents one of situations listed below. Driver status word can be found in /driver/stat
.
For convenience and accessibility, after triggering, the bits in /driver/stat
are kept set for at least a second. Similarly, the bits are reset all at once, only if all the triggers are clear for more than one second.
Bit | Name | Description |
---|---|---|
0 | Overcurrent | Current greater than ipeak was detected and the control topology has been altered to prevent the current from rising further. |
1 | Undervoltage | Battery voltage is below the minimum operating voltage. Motor current is limited to prevent the voltage from further falling. If the voltage falls too low, driver error is raised and motor is stopped. |
2 | Overtemp | Controller over-temperature was detected. There are two inputs: If /driver/temp and /driver/ptctemp engaged. |
3 | Overvoltage | Battery voltage risen above the maximum operating voltage. Motor current is limited to prevent the voltage from further rising. If voltage goes too high, driver error is raised and motor is stopped |
4 | Sensor error | Rotor angle sensor problem was detected |
5 | ADC error | An internal analog circuitry error |
6 | Sync error | An internal firmware synchronization error, typically caused by the MCU overload. |
7 | Range | Controller is operating outside of the nominal operating range. |