fix(duch): Cat1 DUCH模式10分钟定时硬件复位+LIPOPEN AtCmd残留修复

- DUCH_MODE while循环加复位定时器(12000×50ms=10分钟)
- 空闲超时翻转CAT1_RESET引脚复位的模块
- CAT_ONE_LIPOPEN响应OK/LIPOPEN:0,1后重置AtCmd为NULL
This commit is contained in:
2026-08-04 15:54:56 +08:00
parent 706421d387
commit a4e23fe2cc
2 changed files with 15 additions and 22 deletions
+8 -19
View File
@@ -432,9 +432,9 @@
<Bp> <Bp>
<Number>0</Number> <Number>0</Number>
<Type>0</Type> <Type>0</Type>
<LineNumber>643</LineNumber> <LineNumber>568</LineNumber>
<EnabledFlag>1</EnabledFlag> <EnabledFlag>1</EnabledFlag>
<Address>55060</Address> <Address>54318</Address>
<ByteObject>0</ByteObject> <ByteObject>0</ByteObject>
<HtxType>0</HtxType> <HtxType>0</HtxType>
<ManyObjects>0</ManyObjects> <ManyObjects>0</ManyObjects>
@@ -443,23 +443,7 @@
<BreakIfRCount>1</BreakIfRCount> <BreakIfRCount>1</BreakIfRCount>
<Filename>..\source\User\Src\CatOneTask.c</Filename> <Filename>..\source\User\Src\CatOneTask.c</Filename>
<ExecCommand></ExecCommand> <ExecCommand></ExecCommand>
<Expression>\\GateWay\../source/User/Src/CatOneTask.c\643</Expression> <Expression>\\GateWay\../source/User/Src/CatOneTask.c\568</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>569</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>54386</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\source\User\Src\CatOneTask.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\GateWay\../source/User/Src/CatOneTask.c\569</Expression>
</Bp> </Bp>
</Breakpoint> </Breakpoint>
<WatchWindow1> <WatchWindow1>
@@ -503,6 +487,11 @@
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>CatOne.AtCmd</ItemText> <ItemText>CatOne.AtCmd</ItemText>
</Ww> </Ww>
<Ww>
<count>8</count>
<WinNumber>1</WinNumber>
<ItemText>rstCnt,0x0A</ItemText>
</Ww>
</WatchWindow1> </WatchWindow1>
<WatchWindow2> <WatchWindow2>
<Ww> <Ww>
+6 -2
View File
@@ -543,6 +543,7 @@ void CatOneLoopHandler(void)
case CAT_ONE_DUCH_MODE: case CAT_ONE_DUCH_MODE:
Cat1DuchReady = true; Cat1DuchReady = true;
uint16_t rstCnt = 0;
while(ChannelIsActive(CatOne.GateWay->ConfigPara, CH_CAT1)) { while(ChannelIsActive(CatOne.GateWay->ConfigPara, CH_CAT1)) {
if(duchRd != duchWr) { if(duchRd != duchWr) {
uint16_t avail = (duchWr - duchRd) & 0x1FFF; uint16_t avail = (duchWr - duchRd) & 0x1FFF;
@@ -563,9 +564,12 @@ void CatOneLoopHandler(void)
} else { } else {
rt_thread_delay(50); rt_thread_delay(50);
} }
if(++rstCnt > 12000) {
rstCnt = 0;
CatOne.Cat1Status = CAT_ONE_INIT;
break;
}
} }
Cat1DuchReady = false;
CatOne.Cat1Status = CAT_ONE_IDEL;
break; break;
case CAT_ONE_OFF: case CAT_ONE_OFF: