foxBMS-UnitTests
1.0.0
The foxBMS Unit Tests API Documentation
|
bms driver configuration header More...
Go to the source code of this file.
Macros | |
#define | BMS_REQ_ID_NOREQ (0u) |
#define | BMS_REQ_ID_STANDBY (8u) |
#define | BMS_REQ_ID_NORMAL (3u) |
#define | BMS_REQ_ID_CHARGE (4u) |
#define | BMS_NO_STRING_AVAILABLE (255u) |
Functions searching for next string return this value if no further string is available. More... | |
#define | BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS (10u) |
TODO. More... | |
#define | BMS_STATEMACH_SHORTTIME (1u) |
BMS statemachine short time definition in BMS_Trigger() calls until next state/substate is processed. More... | |
#define | BMS_STATEMACH_MEDIUMTIME (5u) |
BMS statemachine medium time definition in BMS_Trigger() calls until next state/substate is processed. More... | |
#define | BMS_STATEMACH_LONGTIME (10u) |
BMS statemachine long time definition in BMS_Trigger() calls until next state/substate is processed. More... | |
#define | BMS_STATEMACH_VERYLONGTIME (20u) |
BMS statemachine very long time definition in BMS_Trigger() calls until next state/substate is processed. More... | |
#define | BMS_TIME_WAIT_AFTER_STRING_CLOSED (20u) |
#define | BMS_TIME_WAIT_AFTER_OPENING_STRING (10u) |
#define | BMS_STRING_CLOSE_TIMEOUT (500u) |
Timeout in BMS_Trigger() calls when closing a string after which the state machines goes to error if the string still has not closed. More... | |
#define | BMS_STRING_OPEN_TIMEOUT (1000u) |
#define | BMS_NEXT_STRING_VOLTAGE_LIMIT_MV (3000) |
Max voltage difference in mV between two strings to allow closing the next string. More... | |
#define | BMS_AVERAGE_STRING_CURRENT_LIMIT_MA (20000) |
#define | BMS_TIME_WAIT_AFTER_CLOSING_PRECHARGE (100u) |
#define | BMS_TIME_WAIT_AFTER_OPENING_PRECHARGE (50u) |
#define | BMS_TIME_WAIT_AFTERPRECHARGEFAIL (300U) |
Time to wait in BMS_Trigger() calls after precharge opened because precharge failed. More... | |
#define | BMS_OSCILLATION_TIMEOUT (1000u) |
Timeout in 1*10ms to wait before re-entering to precharge. More... | |
#define | BMS_PRECHARGE_TRIES (3u) |
#define | BMS_PRECHARGE_VOLTAGE_THRESHOLD_mV (1000LL) /* mV */ |
#define | BMS_PRECHARGE_CURRENT_THRESHOLD_mA (50) /* mA */ |
#define | BMS_STATEMACH_TIMEAFTERPRECHARGEFAIL (100u) |
#define | BMS_PRECHARGE_CLOSE_TIMEOUT (500u) |
#define | BMS_PRECHARGE_OPEN_TIMEOUT (500u) |
bms driver configuration header
BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
″This product uses parts of foxBMS®″
″This product includes parts of foxBMS®″
″This product is derived from foxBMS®″
Definition in file bms_cfg.h.
#define BMS_AVERAGE_STRING_CURRENT_LIMIT_MA (20000) |
#define BMS_NEXT_STRING_VOLTAGE_LIMIT_MV (3000) |
#define BMS_NO_STRING_AVAILABLE (255u) |
#define BMS_OSCILLATION_TIMEOUT (1000u) |
#define BMS_PRECHARGE_CLOSE_TIMEOUT (500u) |
Timeout in BMS_Trigger() calls when closing precharge after which the state machines goes to error if precharge still has not closed
#define BMS_PRECHARGE_CURRENT_THRESHOLD_mA (50) /* mA */ |
#define BMS_PRECHARGE_OPEN_TIMEOUT (500u) |
Timeout in BMS_Trigger() calls when opening precharge after which the state machines goes to error if precharge still has not opened
#define BMS_PRECHARGE_TRIES (3u) |
#define BMS_PRECHARGE_VOLTAGE_THRESHOLD_mV (1000LL) /* mV */ |
#define BMS_REQ_ID_CHARGE (4u) |
#define BMS_REQ_ID_NOREQ (0u) |
#define BMS_REQ_ID_NORMAL (3u) |
#define BMS_REQ_ID_STANDBY (8u) |
#define BMS_STATEMACH_LONGTIME (10u) |
BMS statemachine long time definition in BMS_Trigger() calls until next state/substate is processed.
#define BMS_STATEMACH_MEDIUMTIME (5u) |
BMS statemachine medium time definition in BMS_Trigger() calls until next state/substate is processed.
#define BMS_STATEMACH_SHORTTIME (1u) |
BMS statemachine short time definition in BMS_Trigger() calls until next state/substate is processed.
#define BMS_STATEMACH_TIMEAFTERPRECHARGEFAIL (100u) |
Time to wait after contactors opened because precharge failed in BMS_Trigger() calls
#define BMS_STATEMACH_VERYLONGTIME (20u) |
BMS statemachine very long time definition in BMS_Trigger() calls until next state/substate is processed.
#define BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS (10u) |
TODO.
This define MUST represent the cycle time of the task in which context the functions run, e.g., if the BMS_Trigger() is running in the 10 ms task then the define must be set to 10. This sets the minimum time between two subsequent executed states/substates. Define is only used for compile-time assertion, it has no programatic influence on the actual code.
#define BMS_STRING_CLOSE_TIMEOUT (500u) |
Timeout in BMS_Trigger() calls when closing a string after which the state machines goes to error if the string still has not closed.
#define BMS_STRING_OPEN_TIMEOUT (1000u) |
Timeout in BMS_Trigger() calls to wait after opening a string
#define BMS_TIME_WAIT_AFTER_CLOSING_PRECHARGE (100u) |
Delay after closing precharge in BMS_Trigger() calls
#define BMS_TIME_WAIT_AFTER_OPENING_PRECHARGE (50u) |
Delay after opening precharge in BMS_Trigger() calls
#define BMS_TIME_WAIT_AFTER_OPENING_STRING (10u) |
Time in BMS_Trigger() calls to wait after opening a string
#define BMS_TIME_WAIT_AFTER_STRING_CLOSED (20u) |
Time in BMS_Trigger() calls to wait after closing a string
#define BMS_TIME_WAIT_AFTERPRECHARGEFAIL (300U) |
Time to wait in BMS_Trigger() calls after precharge opened because precharge failed.