/*
 * File: BCCR_RlyCtlDiag_parameters.c
 *
 * Code generated for Simulink model 'BCCR_RlyCtlDiag'.
 *
 * Model version                  : 1.743
 * Simulink Coder version         : 8.11 (R2016b) 25-Aug-2016
 * C/C++ source code generated on : Wed Mar 03 11:30:47 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Infineon->TriCore
 * Code generation objectives:
 *    1. MISRA C:2012 guidelines
 *    2. Execution efficiency
 * Validation result: Not run
 */

#include "rtwtypes.h"
#include "zero_crossing_types.h"
#include "BCCR_RlyCtlDiag_types.h"

/* Exported data definition */
#define ASW1_OEM_START_SEC_DEFAULT_CALIB_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/* Definition for custom storage class: Const */
const volatile boolean_T BCCR_bDCNegCtrSwtOnReq_C = 0;
const volatile boolean_T BCCR_bDchrgCtlHwSel_C = 0;/* Hardware of UAES:0      Hardware of HS:1 */
const volatile boolean_T BCCR_bDchrgCtrStdSel_C = 1;/* Software of GBT:0          Software of Euro:1 */
const volatile boolean_T BCCR_bDchrgDiagHwSel_C = 0;/* Hardware of UAES:0      Hardware of HS:1 */
const volatile boolean_T BCCR_bDchrgDiagStdSel_C = 0;/* Software of GBT:0          Software of Euro:1 */
const volatile boolean_T BCCR_bDchrgNegClsdHealSel_C = 1;
const volatile boolean_T BCCR_bMNegCtrSwtOnReq_C = 0;
const volatile boolean_T BCCR_bMnCtlHwSel_C = 0;/* Hardware of UAES:0      Hardware of HS:1 */
const volatile boolean_T BCCR_bMnDiagHwSel_C = 0;/* Hardware of UAES:0      Hardware of HS:1 */
const volatile boolean_T BCCR_bPreChCtrSwtOnReq_C = 0;
const volatile uint8_T BCCR_cntStuckClsdPosFastDiag_CW = 1U;/* Codeword of fast diagnosis for positive contactor stuck closed check */
const volatile boolean_T BCCR_flgPreChgEnrgDiagEn_C = 1;/* The switch of precharge resistance energy diagnosis */
const volatile boolean_T BCCR_flgPwrUpDiagEn_C = 0;
const volatile real32_T BCCR_iBattCurrPreChLoThres_CUR[8] = { 1.0F, 1.0F, 2.0F,
  2.0F, 2.0F, 3.0F, 3.0F, 4.0F } ;     /* Max precharge current according to battery voltage and pack voltage */

const volatile real32_T BCCR_iBattCurrPreChLoThres_CUR_X[8] = { 50.0F, 100.0F,
  150.0F, 200.0F, 250.0F, 300.0F, 350.0F, 400.0F } ;/* Axis for curve BCCR_iBattCurrPreChLoThres_CUR */

const volatile real32_T BCCR_iCurrStuckOpnMnHi_C = 5.0F;/* Max  current for main negative contactor stuck open fault healing */
const volatile real32_T BCCR_iCurrStuckOpnMnLo_C = 2.0F;/* Max  current for main negative contactor stuck open fault detect */
const volatile real32_T BCCR_iCurrStuckOpnMpLo_C = 2.0F;/* Max  current for main positive contactor stuck open diagnosis */
const volatile uint8_T BCCR_numPreChgCtlCnt_C = 3U;/* Number of repeated attempts for precharge failure for ctrl */
const volatile uint8_T BCCR_numPreChgDiagCnt_C = 3U;/* Number of repeated attempts for precharge failure for diagnostic */
const volatile uint8_T BCCR_stBmsCtrModeFault_C = 14U;
const volatile uint8_T BCCR_stBmsCtrModePreFault_C = 6U;
const volatile uint8_T BCCR_stBmsCtrModePrechg_C = 3U;
const volatile uint8_T BCCR_stPwrUpCondHvil_C = 0U;
const volatile uint8_T BCCR_stPwrUpCondIso_C = 0U;
const volatile real32_T BCCR_tBattTempCtrCtrlHi_C = 60.0F;/* Temperature threshold: max temperature allowed for power up control */
const volatile real32_T BCCR_tBattTempCtrCtrlLo_C = -38.0F;/* Temperature threshold: min temperature allowed for power up control */
const volatile real32_T BCCR_tiCctDriveDiagEna_C = 0.1F;/* Time debounce for Drive Circuit diagnosis */
const volatile real32_T BCCR_tiDChrgCtrWaitThres_C = 0.06F;/* Time Threshold for positive contactor switch on control after negative switch on  */
const volatile real32_T BCCR_tiDChrgHldThres_C = 1.0F;/* Maximum time for  DC charge Contactor power up control */
const volatile real32_T BCCR_tiDChrgPwrUpThres_C = 0.2F;/* Time Threshold for positive contactor switch on control after negative switch on  */
const volatile real32_T BCCR_tiDChrgWrkSwtThres_C = 0.1F;/* Time Threshold for dc charge work status switch on control after positive switch on  */
const volatile real32_T BCCR_tiIniHldMax_C = 0.3F;/* Time Threshold for precharge contactor switch on control after negative contactor switch on  */
const volatile real32_T BCCR_tiIsoCheckStaus_C = 0.2F;/* Time delay for insulation check staus */
const volatile real32_T BCCR_tiMNegCtrSwtOffWaitThres_C = 0.2F;/* Time Threshold for negative contactor switch off control after positive contactor switch off  */
const volatile real32_T BCCR_tiPreChCtrSwtOffWaitThres_C = 0.1F;/* Time Threshold for precharge contactor switch off control after positive contactor switch on  */
const volatile real32_T BCCR_tiPreChCtrSwtOnWaitThres_C = 0.15F;/* Time Threshold for precharge contactor switch on control after negative contactor switch on  */
const volatile real32_T BCCR_tiPreChMax_C = 0.85F;/* Allowed max time threshold for precharge control */
const volatile real32_T BCCR_tiPreChgEnrgDet_C = 0.05F;/* Time debounce for relay Circuit diagnosis */
const volatile real32_T BCCR_tiPwrUpCondLv_C = 0.3F;
const volatile real32_T BCCR_tiRlyCctFaultDet_C = 2.0F;/* Time debounce for relay Circuit diagnosis */
const volatile real32_T BCCR_tiRlyCctFaultHeal_C = 2.0F;/* Time debounce for relay Circuit diagnosis */
const volatile real32_T BCCR_tiStuckClsdDChrgDet_C = 1.0F;/* Time debounce for dc charge contactor stuck open diagnosis */
const volatile real32_T BCCR_tiStuckClsdDChrgNegErr_C = 1.0F;/* Time debounce for dc charge negative contactor stuck closed error diagnosis */
const volatile real32_T BCCR_tiStuckClsdDChrgNegHeal_C = 0.1F;/* Time debounce for dc charge negative contactor stuck closed healing diagnosis */
const volatile real32_T BCCR_tiStuckClsdDChrgNegWait_C = 2.0F;/* Time debounce for dc charge positve contactor stuck closed error diagnosis */
const volatile real32_T BCCR_tiStuckClsdDChrgPosWait_C = 2.0F;/* Time debounce for dc charge positve contactor stuck closed error diagnosis */
const volatile real32_T BCCR_tiStuckClsdDChrgThres_C = 0.18F;/* Time debounce for dc charge contactor stuck open diagnosis */
const volatile real32_T BCCR_tiStuckClsdMnDet_C = 0.28F;/* Time debounce for negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckClsdMnOk_C = 0.16F;/* Time debounce for negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckClsdMnUpDet_C = 1.0F;/* Time debounce for negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckClsdMnUpOk_C = 0.1F;/* Time debounce for negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckClsdMnUpWait_C = 2.0F;/* Time debounce for main negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckClsdMnWait_C = 0.3F;/* Time debounce for main negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckClsdMpOk_C = 0.16F;/* Time debounce for negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckClsdPosFastOk_C = 0.06F;/* Time debounce for positive contactor stuck closed diagnosis during fast diagnosis */
const volatile real32_T BCCR_tiStuckClsdPosFrstDet_C = 1.0F;/* Time debounce for positive contactor stuck closed diagnosis during power up */
const volatile real32_T BCCR_tiStuckClsdPosScndErr_C = 1.4F;/* Time debounce for positive contactor stuck closed diagnosis during power down */
const volatile real32_T BCCR_tiStuckClsdPosScndOk_C = 0.1F;/* Time debounce for positive contactor stuck closed diagnosis during power down */
const volatile real32_T BCCR_tiStuckClsdPosWait_C = 0.5F;/* Time window for positive contactor stuck closed diagnosis during fast diagnosis */
const volatile real32_T BCCR_tiStuckClsdWait_C = 1.5F;/* Time window for main positive contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiStuckOpnDChrgNegErr_C = 3.0F;/* Time debounce for dc charge negative contactor stuck open detect */
const volatile real32_T BCCR_tiStuckOpnDChrgNegHeal_C = 3.0F;/* Time debounce for dc charge negative contactor stuck open healing */
const volatile real32_T BCCR_tiStuckOpnDChrgNegWait_C = 5.0F;/* Max time for dc charge contactor stuck open diagnosis */
const volatile real32_T BCCR_tiStuckOpnDChrgPosErr_C = 1.0F;/* Time debounce for dc charge positive contactor stuck open detect */
const volatile real32_T BCCR_tiStuckOpnDChrgPosHeal_C = 0.08F;/* Time debounce for dc charge positive contactor stuck open healing */
const volatile real32_T BCCR_tiStuckOpnMpErr_C = 5.0F;/* Time debounce for main negative contactor stuck open diagnosis */
const volatile real32_T BCCR_tiStuckOpnMpOk_C = 280.0F;/* Time debounce for main negative contactor stuck open diagnosis */
const volatile real32_T BCCR_tiStuckOpnMpWait_C = 300.0F;/* Time window for main positive contactor stuck closed diagnosis */
const volatile real32_T BCCR_tiVoffRisePwrUpAvl_C = 0.25F;
const volatile real32_T BCCR_tiVoffRisePwrUpPass_C = 0.2F;
const volatile real32_T BCCR_uBattCellVoltDiff_C = 30.0F;/* Voltage difference between battery voltage and cell voltage */
const volatile real32_T BCCR_uDChrgVoltDiff_C = 20.0F;/* Threshold: difference between battery voltage and DC charge voltage */
const volatile real32_T BCCR_uDChrgVoltLo_C = 50.0F;/* Threshold: DC charge voltage after DC charge contactor switch off */
const volatile real32_T BCCR_uDiffMpPrDisable_C = 6.0F;/* Voltage difference compared with pack voltage stored at last driving cycle for positive contactor stcuk closed diagnosis */
const volatile real32_T BCCR_uDiffStuckClsdMcuBatt_C = 30.0F;/* Voltage difference between pack voltage and MCU voltage for positive contactor stuck closed diagnosis */
const volatile real32_T BCCR_uDiffStuckClsdMpPrDet_C = 50.0F;/* Voltage difference compared with pack voltage stored at last driving cycle for positive contactor stcuk closed diagnosis */
const volatile real32_T BCCR_uDiffStuckClsdMpPrHi_C = 200.0F;/* Max threshold of voltage for positive contactor stuck closed diagnosis */
const volatile real32_T BCCR_uDiffStuckClsdMpPrLo_C = 6.0F;/* Min threshold of voltage for positive contactor stuck closed diagnosis */
const volatile real32_T BCCR_uDiffStuckOpnMpErr_C = 50.0F;/* Max pack voltage fluctation after main positive disconnected for main positive stuck diagnosis */
const volatile real32_T BCCR_uDiffStuckOpnMpOk_C = 10.0F;/* Threshold of the voltage difference between pack voltage and battery voltage for main positive contactor stuck open diagnosis */
const volatile real32_T BCCR_uKl30cCctPlausDiagHi_C = 16.0F;/* Max threshold of kl30c voltage for circort diagnosis */
const volatile real32_T BCCR_uKl30cCctPlausDiagLo_C = 9.0F;/* Min threshold of kl30c voltage for circort diagnosis */
const volatile real32_T BCCR_uKl30cCtrPlausDiagHi_C = 16.0F;/* Max threshold of kl30c voltage for contactor stuck diagnosis */
const volatile real32_T BCCR_uKl30cCtrPlausDiagLo_C = 9.0F;/* Min threshold of kl30c voltage for contactor stuck diagnosis */
const volatile real32_T BCCR_uNegStuckClsdMnHi_C = 50.0F;/* Voltage threshold for negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_uNegStuckClsdMnLo_C = 5.0F;/* Voltage threshold for negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_uPackBgnThres_C = 0.0F;/* Max pack voltage before precharge contactor connect for precharge contactor stuck open diagnosis */
const volatile real32_T BCCR_uPackDeltRiseHi_C = 50.0F;/* Max threshold for pack voltage fluctuation after precharge contactor connected */
const volatile real32_T BCCR_uPackDeltRiseLo_C = 30.0F;/* Min threshold for pack voltage fluctuation after main positive contactor connected */
const volatile real32_T BCCR_uPackDiffDecrHi_C = 50.0F;/* Threshold of the voltage difference between pack voltage and battery voltage for main positive contactor stuck open diagnosis */
const volatile real32_T BCCR_uPackDiffDecrLo_C = 6.0F;/* Min pack voltage fluctation after main positive disconnected for main positive stuck closed check */
const volatile real32_T BCCR_uPackPreRlyOk_C = 100.0F;/* Voltage threshold for Prechrg contactor closed successflly */
const volatile real32_T BCCR_uRlyCctFaultHi_C = 4.5F;/* Threshold for relay Circuit diagnosis */
const volatile real32_T BCCR_uRlyCctFaultLo_C = 1.5F;/* Threshold for relay Circuit diagnosis */
const volatile real32_T BCCR_uStuckClsdDcNegDiff_C = 10.0F;/* Threshold of dc charge voltage and dc negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_uStuckClsdDcNeg_C = 50.0F;/* Threshold of dc charge voltage for dc negative contactor stuck closed diagnosis */
const volatile real32_T BCCR_uStuckClsdDcPosDiff_C = 10.0F;/* Threshold between dc charge voltage and pack voltage for dc positive contactor stuck closed diagnosis */
const volatile real32_T BCCR_uStuckClsdDcPosHi_C = 250.0F;/* Threshold of dc charge voltage for dc positive contactor stuck closed diagnosis */
const volatile real32_T BCCR_uStuckOpnDcNegHi_C = 50.0F;/* Threshold of dc charge voltage for dc negative contactor stuck open diagnosis */
const volatile real32_T BCCR_uStuckOpnDiffHiThres_C = 250.0F;/* Max threshold for dc charge voltage change after contactor switched on */
const volatile real32_T BCCR_uStuckOpnDiffLoThres_C = 10.0F;/* Min threshold for dc charge voltage change after contactor switched on */
const volatile real32_T BCCR_uStuckOpnDiffThres_C = 10.0F;/* Difference threshold between pack voltage and dc charge voltage before dc contactor switching on */
const volatile real32_T BCCR_uVoltDiff_C = 20.0F;/* Voltage difference between battery voltage and pack voltage downstream the main contactor */
const volatile real32_T BCCR_wPreChgResEnrgLmt_C = 13.0F;/* The energy limit of the precharge resistor during the precharge process */
const volatile real32_T COMR_uBattVoltDiagCtrLo_C = 150.0F;/* Effective voltage of diagnostic enabled  */

#define ASW1_OEM_STOP_SEC_DEFAULT_CALIB_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
