Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
DC360_1drap3_xiaoju_V1
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁雨邯
DC360_1drap3_xiaoju_V1
Commits
ec098bd1
提交
ec098bd1
authored
5月 18, 2020
作者:
wysheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
输出断路检测使用宏控制
上级
e61ba458
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
68 行增加
和
23 行删除
+68
-23
Drv_BoardIo.c
DcPillar/Src/Drivers/Drv_BoardIo.c
+29
-11
Drv_BoardIo.h
DcPillar/Src/Drivers/Drv_BoardIo.h
+20
-3
ChgPro_ShakeHand.c
DcPillar/Src/Thread/Charge/ChgPro_ShakeHand.c
+7
-3
ChgPro_B_ShakeHand.c
DcPillar/Src/Thread/Charge_B/ChgPro_B_ShakeHand.c
+7
-4
Thd_Charge.c
DcPillar/Src/Thread/Thd_Charge.c
+5
-2
没有找到文件。
DcPillar/Src/Drivers/Drv_BoardIo.c
浏览文件 @
ec098bd1
...
@@ -341,18 +341,28 @@ void BmsPowerSet_B(EnumSwitchStatus Set)
...
@@ -341,18 +341,28 @@ void BmsPowerSet_B(EnumSwitchStatus Set)
BmsPower_B_Port
->
BSRRL
=
BmsPower_B_Pin
;
BmsPower_B_Port
->
BSRRL
=
BmsPower_B_Pin
;
}
}
#if TEST_OUT_SHORT
void
ShortCirCheck
(
void
)
void
ShortCirCheck
(
void
)
{
{
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
ShortCirCheck_Pin
;
GPIO_InitStructure
.
GPIO_Pin
=
ShortCirCheck_Pin
;
RCC_AHB1PeriphClockCmd
(
ShortCirCheck_RCC
,
ENABLE
);
RCC_AHB1PeriphClockCmd
(
ShortCirCheck_RCC
,
ENABLE
);
GPIO_Init
(
ShortCirCheck_Port
,
&
GPIO_InitStructure
);
GPIO_Init
(
ShortCirCheck_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
ShortCirCheck_Port
,
ShortCirCheck_Pin
);
GPIO_ResetBits
(
ShortCirCheck_Port
,
ShortCirCheck_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
GPIO_InitStructure
.
GPIO_Pin
=
ShortCirCheckGet_Pin
;
RCC_AHB1PeriphClockCmd
(
ShortCirCheckGet_RCC
,
ENABLE
);
GPIO_Init
(
ShortCirCheckGet_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
ShortCirCheckGet_Port
,
ShortCirCheckGet_Pin
);
}
}
void
ShortCirCheckSet
(
EnumSwitchStatus
Set
)
void
ShortCirCheckSet
(
EnumSwitchStatus
Set
)
...
@@ -360,9 +370,17 @@ void ShortCirCheckSet(EnumSwitchStatus Set)
...
@@ -360,9 +370,17 @@ void ShortCirCheckSet(EnumSwitchStatus Set)
if
(
eSwSta_Off
==
Set
)
if
(
eSwSta_Off
==
Set
)
ShortCirCheck_Port
->
BSRRH
=
ShortCirCheck_Pin
;
ShortCirCheck_Port
->
BSRRH
=
ShortCirCheck_Pin
;
else
else
BmsPower_B
_Port
->
BSRRL
=
ShortCirCheck_Pin
;
ShortCirCheck
_Port
->
BSRRL
=
ShortCirCheck_Pin
;
}
}
EnumSwitchStatus
ShortCirCheckGet
(
void
)
{
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
ShortCirCheckGet_Port
,
ShortCirCheckGet_Pin
))
return
eSwSta_On
;
return
eSwSta_Off
;
}
#endif
static
void
DCOutDelayHandle_B
(
void
const
*
Param
)
static
void
DCOutDelayHandle_B
(
void
const
*
Param
)
{
{
DcOutPos_B_Port
->
BSRRL
=
DcOutPos_B_Pin
;
DcOutPos_B_Port
->
BSRRL
=
DcOutPos_B_Pin
;
...
@@ -1111,7 +1129,7 @@ EnumSwitchStatus GunStatusGet_B(void)
...
@@ -1111,7 +1129,7 @@ EnumSwitchStatus GunStatusGet_B(void)
void
DCModuleRelayChkInit
(
void
)
void
DCModuleRelay
Out
ChkInit
(
void
)
{
{
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitTypeDef
GPIO_InitStructure
;
...
...
DcPillar/Src/Drivers/Drv_BoardIo.h
浏览文件 @
ec098bd1
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
#define __DRV_BOARDIO_H__
#define __DRV_BOARDIO_H__
#include "Global.h"
#include "Global.h"
#define TEST_OUT_SHORT 0 //输出短路测试
#if 1
#if 1
//A枪BMS供电输出控制
//A枪BMS供电输出控制
...
@@ -63,10 +65,17 @@
...
@@ -63,10 +65,17 @@
#define BmsPower_B_Port GPIOF
#define BmsPower_B_Port GPIOF
#define BmsPower_B_RCC RCC_AHB1Periph_GPIOF
#define BmsPower_B_RCC RCC_AHB1Periph_GPIOF
#if TEST_OUT_SHORT
#define ShortCirCheck_Pin GPIO_Pin_3
#define ShortCirCheck_Pin GPIO_Pin_3
#define ShortCirCheck_Port GPIOF
#define ShortCirCheck_Port GPIOF
#define ShortCirCheck_RCC RCC_AHB1Periph_GPIOF
#define ShortCirCheck_RCC RCC_AHB1Periph_GPIOF
#define ShortCirCheckGet_Pin GPIO_Pin_4
#define ShortCirCheckGet_Port GPIOD
#define ShortCirCheckGet_RCC RCC_AHB1Periph_GPIOD
#endif
//A枪归位状态
//A枪归位状态
#define DcOutChkPos_B_Pin GPIO_Pin_5
#define DcOutChkPos_B_Pin GPIO_Pin_5
#define DcOutChkPos_B_Port GPIOE
#define DcOutChkPos_B_Port GPIOE
...
@@ -302,8 +311,13 @@ extern void FaultLedInit_B(void);
...
@@ -302,8 +311,13 @@ extern void FaultLedInit_B(void);
extern
void
FaultLedSet_B
(
EnumSwitchStatus
Set
);
extern
void
FaultLedSet_B
(
EnumSwitchStatus
Set
);
extern
void
IdleLedInit_B
(
void
);
extern
void
IdleLedInit_B
(
void
);
extern
void
IdleLedSet_B
(
EnumSwitchStatus
Set
);
extern
void
IdleLedSet_B
(
EnumSwitchStatus
Set
);
#if TEST_OUT_SHORT
extern
void
ShortCirCheck
(
void
);
extern
void
ShortCirCheck
(
void
);
extern
void
ShortCirCheckSet
(
EnumSwitchStatus
Set
);
extern
EnumSwitchStatus
ShortCirCheckGet
(
void
);
#endif
extern
void
FanInit
(
void
);
extern
void
FanInit
(
void
);
extern
void
FanInit_Top
(
void
);
extern
void
FanInit_Top
(
void
);
...
@@ -324,7 +338,6 @@ extern void FanSetExt_Top(EnumSwitchStatus Set);
...
@@ -324,7 +338,6 @@ extern void FanSetExt_Top(EnumSwitchStatus Set);
//extern EnumSwitchStatus DcOutGet_Uni(void);
//extern EnumSwitchStatus DcOutGet_Uni(void);
//extern void DehumidifierInit(void);
//extern void DehumidifierInit(void);
//extern void DehumidifierSet(EnumSwitchStatus Set);
//extern void DehumidifierSet(EnumSwitchStatus Set);
extern
void
EmergenceInit
(
void
);
extern
void
EmergenceInit
(
void
);
extern
EnumSwitchStatus
EmergenceGet
(
void
);
extern
EnumSwitchStatus
EmergenceGet
(
void
);
...
@@ -344,14 +357,18 @@ extern void LockSet_AB(EnumSwitchStatus Set);
...
@@ -344,14 +357,18 @@ extern void LockSet_AB(EnumSwitchStatus Set);
extern
EnumSwitchStatus
LockGet_AB
(
void
);
extern
EnumSwitchStatus
LockGet_AB
(
void
);
extern
void
RunLedInit
(
void
);
extern
void
RunLedInit
(
void
);
extern
void
RunLedSet
(
EnumSwitchStatus
Set
);
extern
void
RunLedSet
(
EnumSwitchStatus
Set
);
extern
void
ShortCirCheckSet
(
EnumSwitchStatus
Set
);
extern
EnumSwitchStatus
ACContactorGet
(
void
);
extern
EnumSwitchStatus
ACContactorGet
(
void
);
extern
EnumSwitchStatus
ACContactorSta
;
extern
EnumSwitchStatus
ACContactorSta
;
extern
void
SystemReboot
(
void
);
extern
void
SystemReboot
(
void
);
extern
void
ACContactorInit
(
void
);
extern
void
ACContactorInit
(
void
);
void
GunStatusChkInit
(
void
);
EnumSwitchStatus
GunStatusGet
(
void
);
EnumSwitchStatus
GunStatusGet_B
(
void
);
void
DCModuleRelayOutChkInit
(
void
);
#endif
#endif
DcPillar/Src/Thread/Charge/ChgPro_ShakeHand.c
浏览文件 @
ec098bd1
...
@@ -67,7 +67,9 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
...
@@ -67,7 +67,9 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
BmsCanInit
();
BmsCanInit
();
osDelay
(
20
);
osDelay
(
20
);
#if TEST_OUT_SHORT
u8
ShortCircuitCkeck
=
0
;
u8
ShortCircuitCkeck
=
0
;
#endif
CHM_Send
();
CHM_Send
();
CHM_SendTick
=
GetSystemTick
();
CHM_SendTick
=
GetSystemTick
();
...
@@ -100,11 +102,12 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
...
@@ -100,11 +102,12 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
}
}
else
else
{
{
/*if(ShortCircuitCkeck == 0 )
#if TEST_OUT_SHORT
if
(
ShortCircuitCkeck
==
0
)
{
{
ShortCirCheckSet
(
eSwSta_On
);
ShortCirCheckSet
(
eSwSta_On
);
osDelay
(
1000
);
osDelay
(
1000
);
if(eSwSta_On==
DcOutNegGet_Uni
())
if
(
eSwSta_On
==
ShortCirCheckGet
())
{
{
ShortCircuitCkeck
=
1
;
ShortCircuitCkeck
=
1
;
ShortCirCheckSet
(
eSwSta_Off
);
ShortCirCheckSet
(
eSwSta_Off
);
...
@@ -118,7 +121,8 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
...
@@ -118,7 +121,8 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
TCUCurChgRecd
.
TCUChgStopType
=
0x22
;
TCUCurChgRecd
.
TCUChgStopType
=
0x22
;
}
}
}
}
else*/
else
#endif
{
{
pChargeCtrl
->
CurProcess
=
eChgPro_ImdCheck
;
pChargeCtrl
->
CurProcess
=
eChgPro_ImdCheck
;
pChargeCtrl
->
Param
=
0
;
pChargeCtrl
->
Param
=
0
;
...
...
DcPillar/Src/Thread/Charge_B/ChgPro_B_ShakeHand.c
浏览文件 @
ec098bd1
...
@@ -55,7 +55,9 @@ void ChgProShakeHand_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -55,7 +55,9 @@ void ChgProShakeHand_B(StructChargeCtrl_B *pChargeCtrl)
BhmMsg_B
.
Valid
=
0
;
BhmMsg_B
.
Valid
=
0
;
BhmMsg_B
.
RecvTick
=
GetSystemTick
();
BhmMsg_B
.
RecvTick
=
GetSystemTick
();
BHM_FirstRecv
=
0
;
BHM_FirstRecv
=
0
;
#if TEST_OUT_SHORT
u8
ShortCircuitCkeck
=
0
;
u8
ShortCircuitCkeck
=
0
;
#endif
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
CleanChgTimeCnt_B
();
CleanChgTimeCnt_B
();
BmsPowerSet_B
(
eSwSta_On
);
BmsPowerSet_B
(
eSwSta_On
);
...
@@ -101,13 +103,13 @@ void ChgProShakeHand_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -101,13 +103,13 @@ void ChgProShakeHand_B(StructChargeCtrl_B *pChargeCtrl)
}
}
else
else
{
{
#if TEST_OUT_SHORT
/*
if(ShortCircuitCkeck == 0 )
if
(
ShortCircuitCkeck
==
0
)
{
{
ShortCirCheckSet
(
eSwSta_On
);
ShortCirCheckSet
(
eSwSta_On
);
osDelay
(
1000
);
osDelay
(
1000
);
if(eSwSta_On ==
DcOutNegGet_Uni
())
if
(
eSwSta_On
==
ShortCirCheckGet
())
{
{
ShortCircuitCkeck
=
1
;
ShortCircuitCkeck
=
1
;
ShortCirCheckSet
(
eSwSta_Off
);
ShortCirCheckSet
(
eSwSta_Off
);
...
@@ -121,7 +123,8 @@ void ChgProShakeHand_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -121,7 +123,8 @@ void ChgProShakeHand_B(StructChargeCtrl_B *pChargeCtrl)
TCUCurChgRecd_B
.
TCUChgStopType
=
0x22
;
TCUCurChgRecd_B
.
TCUChgStopType
=
0x22
;
}
}
}
}
else*/
else
#endif
{
{
pChargeCtrl
->
CurProcess
=
eChgPro_B_ImdCheck
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ImdCheck
;
pChargeCtrl
->
Param
=
0
;
pChargeCtrl
->
Param
=
0
;
...
...
DcPillar/Src/Thread/Thd_Charge.c
浏览文件 @
ec098bd1
...
@@ -159,6 +159,7 @@ void Thd_Charge(void const *parameter)
...
@@ -159,6 +159,7 @@ void Thd_Charge(void const *parameter)
//DehumidifierInit();
//DehumidifierInit();
//DrainResistInit();//DrainResistInit_B();
//DrainResistInit();//DrainResistInit_B();
ACContactorInit
();
//交流接触器
ACContactorInit
();
//交流接触器
GunStatusChkInit
();
LockInit
();
//LockInit_B();
LockInit
();
//LockInit_B();
EmergenceInit
();
EmergenceInit
();
DoorChkInit
();
DoorChkInit
();
...
@@ -171,9 +172,11 @@ void Thd_Charge(void const *parameter)
...
@@ -171,9 +172,11 @@ void Thd_Charge(void const *parameter)
BmsPowerInit
();
//BmsPowerInit_B();
BmsPowerInit
();
//BmsPowerInit_B();
BmsCommInit
();
//BmsCommInit_B();
BmsCommInit
();
//BmsCommInit_B();
ShortCirCheck
();
#if TEST_OUT_SHORT
ShortCirCheck
();
#endif
/* Create a Timer */
/* Create a Timer */
osTimerDef
(
ChargeTimer
,
ChargeTimeCountCtrl
);
osTimerDef
(
ChargeTimer
,
ChargeTimeCountCtrl
);
ChargeTimer
=
osTimerCreate
(
osTimer
(
ChargeTimer
),
osTimerPeriodic
,
(
void
*
)
0
);
ChargeTimer
=
osTimerCreate
(
osTimer
(
ChargeTimer
),
osTimerPeriodic
,
(
void
*
)
0
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论