foxBMS - Unit Tests  1.4.0
The foxBMS Unit Tests API Documentation
bender_ir155_helper.h File Reference

Headers for the configuration for the insulation monitoring. More...

#include "general.h"
#include "imd.h"
#include "io.h"
#include "pwm.h"
Include dependency graph for bender_ir155_helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  IR155_MEASUREMENT_s
 
struct  IR155_STATE_s
 

Macros

#define IR155_GET_DIGITAL_STATUS_PIN_STATE()    IO_PinGet(&IR155_DIGITAL_STATUS_INPUT_PORT->DIN, IR155_DIGITAL_STATUS_INPUT_PIN)
 

Typedefs

typedef enum IR155_MEASUREMENT_MODE IR155_MEASUREMENT_MODE_e
 
typedef enum IR155_MEASUREMENT_STATE IR155_MEASUREMENT_STATE_e
 

Enumerations

enum  IR155_MEASUREMENT_MODE {
  IR155_NORMAL_MODE , IR155_SPEEDSTART_MODE , IR155_UNDERVOLTAGE_MODE , IR155_IMD_ERROR_MODE ,
  IR155_GROUNDERROR_MODE , IR155_SHORT_CLAMP , IR155_UNDEFINED_FREQUENCY , IR155_DUTY_CYCLE_MEASUREMENT ,
  IR155_NOSIGNAL , IR155_UNKNOWN
}
 
enum  IR155_MEASUREMENT_STATE {
  IR155_RESISTANCE_MEASUREMENT , IR155_RESISTANCE_MEASUREMENT_UNKNOWN , IR155_RESISTANCE_ESTIMATION , IR155_RESISTANCE_ESTIMATION_UNKNOWN ,
  IR155_UNDERVOLTAGE_MEASUREMENT , IR155_UNDERVOLTAGE_MEASUREMENT_UNKNOWN , IR155_GROUND_ERROR_MODE , IR155_GROUND_ERROR_MODE_UNKNOWN ,
  IR155_IMD_ERROR_MEASUREMENT , IR155_IMD_ERROR_MEASUREMENT_UNKNOWN , IR155_SIGNAL_SHORT , IR155_MEASUREMENT_NOT_VALID ,
  IR155_UNINITIALIZED
}
 

Functions

void IR155_Initialize (uint8_t triggerTime_ms)
 Software initialization of Timer-module. More...
 
void IR155_Deinitialize (void)
 Software deinitialization of Timer-module. More...
 
IR155_MEASUREMENT_s IR155_GetMeasurementValues (void)
 Interface function which delivers the actual signal measurement (duty cyle) and evaluation. Use of intervals because of measuring and signal inaccuracy. The evaluated results are finally written in the database. More...
 

Variables

IR155_STATE_s ir155_state
 

Detailed Description

Headers for the configuration for the insulation monitoring.

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
2021-09-17 (date of creation)
Updated
2022-07-28 (date of last update)
Version
v1.4.0
Prefix
IR155

Definition in file bender_ir155_helper.h.

Macro Definition Documentation

◆ IR155_GET_DIGITAL_STATUS_PIN_STATE

#define IR155_GET_DIGITAL_STATUS_PIN_STATE ( )     IO_PinGet(&IR155_DIGITAL_STATUS_INPUT_PORT->DIN, IR155_DIGITAL_STATUS_INPUT_PIN)

Definition at line 72 of file bender_ir155_helper.h.

Typedef Documentation

◆ IR155_MEASUREMENT_MODE_e

symbolic names for the different measurement modes of Bender Isometer. Defined through the frequency of the measurement signal.

◆ IR155_MEASUREMENT_STATE_e

symbolic names for the different operating states Bender Isometer. Defined through the duty cycle of the measurement signal.

Enumeration Type Documentation

◆ IR155_MEASUREMENT_MODE

symbolic names for the different measurement modes of Bender Isometer. Defined through the frequency of the measurement signal.

Enumerator
IR155_NORMAL_MODE 

PWM frequency: 10Hz

IR155_SPEEDSTART_MODE 

PWM frequency: 30Hz

IR155_UNDERVOLTAGE_MODE 

PWM frequency: 20Hz

IR155_IMD_ERROR_MODE 

PWM frequency: 40Hz

IR155_GROUNDERROR_MODE 

PWM frequency: 50Hz

IR155_SHORT_CLAMP 

PWM frequency: 0Hz

IR155_UNDEFINED_FREQUENCY 

illegal frequency detected

IR155_DUTY_CYCLE_MEASUREMENT 

corrupt signal measurement (e.g. T_on > T_periode,)

IR155_NOSIGNAL 

no signal (e.g. if 100% -> wire break, if 0% -> shortcut to GND

IR155_UNKNOWN 

Definition at line 79 of file bender_ir155_helper.h.

◆ IR155_MEASUREMENT_STATE

symbolic names for the different operating states Bender Isometer. Defined through the duty cycle of the measurement signal.

Enumerator
IR155_RESISTANCE_MEASUREMENT 

valid normal measurement working

IR155_RESISTANCE_MEASUREMENT_UNKNOWN 

normal measurement with undefined duty cycle

IR155_RESISTANCE_ESTIMATION 

SPEEDSTART estimation working

IR155_RESISTANCE_ESTIMATION_UNKNOWN 

SPEEDSTART estimation with undefined duty cycle

IR155_UNDERVOLTAGE_MEASUREMENT 

SPEEDSTART estimation working

IR155_UNDERVOLTAGE_MEASUREMENT_UNKNOWN 

SPEEDSTART estimation with undefined duty cycle

IR155_GROUND_ERROR_MODE 

ground error detected

IR155_GROUND_ERROR_MODE_UNKNOWN 

ground error detected with undefined duty cycle

IR155_IMD_ERROR_MEASUREMENT 

device error detected

IR155_IMD_ERROR_MEASUREMENT_UNKNOWN 

device error detected with unkown duty cycle

IR155_SIGNAL_SHORT 

signal short detected

IR155_MEASUREMENT_NOT_VALID 

Invalid measurement detected

IR155_UNINITIALIZED 

Uninitialized state

Definition at line 96 of file bender_ir155_helper.h.

Function Documentation

◆ IR155_Deinitialize()

void IR155_Deinitialize ( void  )

Software deinitialization of Timer-module.

Definition at line 216 of file bender_ir155_helper.c.

◆ IR155_GetMeasurementValues()

IR155_MEASUREMENT_s IR155_GetMeasurementValues ( void  )

Interface function which delivers the actual signal measurement (duty cyle) and evaluation. Use of intervals because of measuring and signal inaccuracy. The evaluated results are finally written in the database.

Returns
IR155_MEASUREMENT_s measurement result of IR155 measurement

Definition at line 230 of file bender_ir155_helper.c.

Here is the call graph for this function:

◆ IR155_Initialize()

void IR155_Initialize ( uint8_t  triggerTime_ms)

Software initialization of Timer-module.

Parameters
triggerTime_mscyclic call time of IR155_GetMeasurementValues function

Definition at line 194 of file bender_ir155_helper.c.

Here is the call graph for this function:

Variable Documentation

◆ ir155_state

IR155_STATE_s ir155_state
extern