Motor Evaluation Kit NEVC-MCTRL-100-t01-1.0.0
Firmware for NEVB-MCTRL-100-01 for trapezoidal control of BLDC motors using Hall-effect sensors
|
Fault LED source file. More...
#include "fault.h"
Go to the source code of this file.
Functions | |
void | EnableOverCurrentLED (void) |
Enables the over current fault LED. | |
void | EnableMotorStoppedLED (void) |
Enables the motor stopped fault LED. | |
void | EnableReverseRotationLED (void) |
Enables the reverse rotation fault LED. | |
void | EnableU3 (void) |
Enables the user function 3 LED. | |
void | EnableU2 (void) |
Enables the user function 2 LED. | |
void | EnableU1 (void) |
Enables the user function 1 LED. | |
void | EnableNoHallConnectionsLED (void) |
Enables the no hall connection fault LED. | |
void | DisableFaultLEDs (void) |
Disables all LEDs. | |
void | SweepLEDsBlocking (void) |
Sweeps through all LEDs individually with a delay. | |
void | faultSequentialStateMachine (volatile faultflags_t *faultFlags, volatile motorflags_t *motorFlags) |
Sequential State Machine for Handling Fault Flags. | |
Fault LED source file.
This file contains all functions necessary for managing and displaying faults through the LED multiplexer.
Definition in file fault.cpp.
void DisableFaultLEDs | ( | void | ) |
Disables all LEDs.
Sets: FAULT_BIT3 = 0 FAULT_BIT2 = 0 FAULT_BIT1 = 0
Definition at line 132 of file fault.cpp.
void EnableMotorStoppedLED | ( | void | ) |
Enables the motor stopped fault LED.
Sets: FAULT_BIT3 = 0 FAULT_BIT2 = 1 FAULT_BIT1 = 0
Definition at line 46 of file fault.cpp.
void EnableNoHallConnectionsLED | ( | void | ) |
void EnableOverCurrentLED | ( | void | ) |
void EnableReverseRotationLED | ( | void | ) |
Enables the reverse rotation fault LED.
Sets: FAULT_BIT3 = 0 FAULT_BIT2 = 1 FAULT_BIT1 = 1
Definition at line 61 of file fault.cpp.
void EnableU1 | ( | void | ) |
void EnableU2 | ( | void | ) |
Enables the user function 2 LED.
Sets: FAULT_BIT3 = 1 FAULT_BIT2 = 0 FAULT_BIT1 = 1
Definition at line 91 of file fault.cpp.
void EnableU3 | ( | void | ) |
Enables the user function 3 LED.
Sets: FAULT_BIT3 = 1 FAULT_BIT2 = 0 FAULT_BIT1 = 0
Definition at line 76 of file fault.cpp.
void faultSequentialStateMachine | ( | volatile faultflags_t * | faultFlags, |
volatile motorflags_t * | motorFlags ) |
Sequential State Machine for Handling Fault Flags.
This function implements a sequential state machine for handling fault flags and controlling corresponding LEDs or indicators. It sequentially checks the various fault flags and enables/disables LEDs or indicators based on the current fault flag conditions.
faultFlags | A pointer to the volatile faultflags_t structure containing the fault flags to be checked. |
motorFlags | A pointer to the volatile motorflags_t structure containing motor control flags (e.g., motor enable status). |
Definition at line 181 of file fault.cpp.
void SweepLEDsBlocking | ( | void | ) |
Sweeps through all LEDs individually with a delay.
Definition at line 144 of file fault.cpp.