foxBMS  1.1.0
The foxBMS Battery Management System API Documentation
interlock_cfg.h File Reference

Header for the configuration for the driver for the interlock. More...

#include "general.h"
#include "HL_gio.h"
Include dependency graph for interlock_cfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ILCK_ELECTRICAL_STATE
 
struct  ILCK_CONFIG
 

Macros

#define ILCK_IO_REG   (gioPORTA)
 
#define ILCK_INTERLOCK_CONTROL   (6U)
 
#define ILCK_INTERLOCK_FEEDBACK   (0U)
 
#define ILCK_TASK_CYCLE_CONTEXT_MS   (10)
 
#define ILCK_STATEMACH_SHORTTIME_MS   (ILCK_TASK_CYCLE_CONTEXT_MS)
 

Typedefs

typedef enum ILCK_ELECTRICAL_STATE_TYPE ILCK_ELECTRICAL_STATE_TYPE_e
 
typedef enum ILCK_FEEDBACK_TYPE ILCK_FEEDBACK_TYPE_e
 
typedef struct ILCK_ELECTRICAL_STATE ILCK_ELECTRICAL_STATE_s
 
typedef struct ILCK_CONFIG ILCK_CONFIG_s
 

Enumerations

enum  ILCK_ELECTRICAL_STATE_TYPE { ILCK_SWITCH_OFF , ILCK_SWITCH_ON , ILCK_SWITCH_UNDEF }
 
enum  ILCK_FEEDBACK_TYPE { ILCK_FEEDBACK_NORMALLY_OPEN , ILCK_FEEDBACK_NORMALLY_CLOSED , ILCK_FEEDBACK_TYPE_DONT_CARE }
 

Variables

ILCK_CONFIG_s ilck_interlock_config
 
ILCK_ELECTRICAL_STATE_s ilck_interlock_state
 

Detailed Description

Header for the configuration for the driver for the interlock.

SPDX-License-Identifier: BSD-3-Clause

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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®″
Author
foxBMS Team
Date
2020-02-24 (date of creation)
Updated
2020-02-24 (date of last update)
Prefix
ILCK

Definition in file interlock_cfg.h.

Macro Definition Documentation

◆ ILCK_INTERLOCK_CONTROL

#define ILCK_INTERLOCK_CONTROL   (6U)

The number of defines per contactor must be the same as the length of the array ilck_contactors_cfg in contactor_cfg.c Every contactor consists of 1 control pin and 1 feedback pin counting together as 1 contactor. E.g. if you have 1 contactor your define has to be:

#define ILCK_INTERLOCK_CONTROL       (PIN_MCU_0_INTERLOCK_CONTROL)
#define ILCK_INTERLOCK_FEEDBACK      (PIN_MCU_0_INTERLOCK_FEEDBACK)

Definition at line 76 of file interlock_cfg.h.

◆ ILCK_INTERLOCK_FEEDBACK

#define ILCK_INTERLOCK_FEEDBACK   (0U)

Defines the pin where interlock feedback pin is connected to the mcu

Definition at line 79 of file interlock_cfg.h.

◆ ILCK_IO_REG

#define ILCK_IO_REG   (gioPORTA)

IO register to which the interlock is connected

Definition at line 65 of file interlock_cfg.h.

◆ ILCK_STATEMACH_SHORTTIME_MS

#define ILCK_STATEMACH_SHORTTIME_MS   (ILCK_TASK_CYCLE_CONTEXT_MS)

ILCK statemachine short time definition in ms

Definition at line 92 of file interlock_cfg.h.

◆ ILCK_TASK_CYCLE_CONTEXT_MS

#define ILCK_TASK_CYCLE_CONTEXT_MS   (10)

This define MUST represent the cycle time of the task in which context the functions run, e.g., if the ILCK_Trigger() is running in the 10 ms task then the define must be set to 10.

This define also sets the minimum time.

Definition at line 89 of file interlock_cfg.h.

Typedef Documentation

◆ ILCK_CONFIG_s

typedef struct ILCK_CONFIG ILCK_CONFIG_s

struct decribing the hardware configuration of the interlock

◆ ILCK_ELECTRICAL_STATE_s

struct describing the electrical state (expected and measured) of the interlock

◆ ILCK_ELECTRICAL_STATE_TYPE_e

Symbolic names for contactors' possible states

◆ ILCK_FEEDBACK_TYPE_e

Symbolic names defining the electric behavior of the contactor

Enumeration Type Documentation

◆ ILCK_ELECTRICAL_STATE_TYPE

Symbolic names for contactors' possible states

Enumerator
ILCK_SWITCH_OFF 

Contactor off --> Contactor is open

ILCK_SWITCH_ON 

Contactor on --> Contactor is closed

ILCK_SWITCH_UNDEF 

Contactor undefined --> Contactor state not known

Definition at line 95 of file interlock_cfg.h.

◆ ILCK_FEEDBACK_TYPE

Symbolic names defining the electric behavior of the contactor

Enumerator
ILCK_FEEDBACK_NORMALLY_OPEN 

Feedback line of a contactor is normally open

ILCK_FEEDBACK_NORMALLY_CLOSED 

Feedback line of a contactor is normally closed

ILCK_FEEDBACK_TYPE_DONT_CARE 

Feedback line of the contactor is not used

Definition at line 102 of file interlock_cfg.h.

Variable Documentation

◆ ilck_interlock_config

ILCK_CONFIG_s ilck_interlock_config
extern

configuration of the interlock

Definition at line 62 of file interlock_cfg.c.

◆ ilck_interlock_state

ILCK_ELECTRICAL_STATE_s ilck_interlock_state
extern

electrical state of the interlock

Definition at line 64 of file interlock_cfg.c.