找到TMR3_CAPTimeoutCfg 进睡眠后 key唤醒升压 就出错
This commit is contained in:
parent
43d4997130
commit
87e0ede049
|
@ -34,7 +34,7 @@ static uint8_t key_press_cnt = 0;
|
|||
// __HIGH_CODE
|
||||
void app_task_handler(TeAppEvtType app_evt_type)
|
||||
{
|
||||
FEED_IWDG();
|
||||
// FEED_IWDG();
|
||||
|
||||
BSP_BlockSleep();
|
||||
BSP_RequestBoost();
|
||||
|
|
|
@ -54,7 +54,7 @@ static uint16_t KEY_Task_ProcessEvent(uint8_t task_id, uint16_t events)
|
|||
|
||||
if (events & KEY_SCAN_EVT)
|
||||
{
|
||||
FEED_IWDG();
|
||||
// FEED_IWDG();
|
||||
|
||||
static volatile uint8_t key_vaild_times = 0;
|
||||
static volatile bool key_vaild_for_long_press = false;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author : stark1898y 1658608470@qq.com
|
||||
* @Date : 2024-12-15 15:01:15
|
||||
* @LastEditors : stark1898y 1658608470@qq.com
|
||||
* @LastEditTime : 2025-05-21 15:56:55
|
||||
* @LastEditTime : 2025-05-21 16:23:23
|
||||
* @FilePath : \BLE_TYQ_CH584M\BSP\src\bsp_valve.c
|
||||
* @Description :
|
||||
*
|
||||
|
@ -610,11 +610,14 @@ void BSP_VAVLE_Init(void)
|
|||
// 1:TMR3_/PWM3_/CAP3_映射到PA[2];
|
||||
R16_PIN_ALTERNATE |= (1 << 3);
|
||||
logDebug("TMR3_CapInit 0");
|
||||
// TODO:这里进睡眠就出错?
|
||||
#if 0
|
||||
|
||||
|
||||
TMR3_CapInit(FallEdge_To_FallEdge);
|
||||
// (1 / 62.4MHz) * 2的26次方 = 0.01602564102564102564102564102564 us * 67108864 约等于 1.0754625641025641025641025641025 S
|
||||
// TMR3_CAPTimeoutCfg(FREQ_SYS ); // 设置捕捉超时时间
|
||||
#if 0
|
||||
// TODO:这里进睡眠就出错?
|
||||
// 在这里偶发重启 RST_FLAG_RPOR
|
||||
TMR3_CAPTimeoutCfg(GetSysClock() / 100); // 设置捕捉超时时间 10ms
|
||||
|
||||
// TMR3_CAPTimeoutCfg(0x3FFFFFF); // 设置捕捉超时时间
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Description : source file(ch585/ch584)
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* Attention: This software (modified or not) and binary are used for
|
||||
* Attention: This software (modified or not) and binary are used for
|
||||
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
|
||||
*******************************************************************************/
|
||||
|
||||
|
|
Loading…
Reference in New Issue