chen
2025-04-24 e53c046d08a448638a56af05ca293310e10b0228
keil/include/main/main.c
@@ -61,14 +61,14 @@
#define TEST_UART_MODE TEST_UART_DMA_MODE
#define NUM_SAMPLES 1
#define SLEEP_START_TIME 60
#define SLEEP_START_TIME 1
#define FREQ_LOST_TIME 5
#define NOTAG_FREQ  1
#define BATTERY_GET_TIME 3600
uint8_t enable_sleep_count,sleep_flag;
uint32_t battery_get_count;
//#define DEBUG_MODE
uint32_t reboot_num;
struct UART_CFG_T test_uart_cfg =
{
        .parity = UART_PARITY_NONE,
@@ -176,9 +176,12 @@
{
    //sleep_timer_start(__MS_TO_32K_CNT(1000));
   static uint8_t lost_jumpcount=0;
   reboot_num++;
   if(reboot_num>=3600)
      NVIC_SystemReset(); //软复位回到bootloader
      enable_sleep_count++;
   if(enable_sleep_count==SLEEP_START_TIME){
      enable_sleep_count=0;
      sleep_flag=1;
   }
@@ -236,9 +239,9 @@
group_id=g_com_map[GROUP_ID];
memcpy(&dev_id ,&g_com_map[DEV_ID],2);
tag_frequency=1000/g_com_map[COM_INTERVAL];   
g_com_map[VERSION] = (1<<8)|10;
g_com_map[VERSION] = (1<<8)|11;
LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id);
LOG_INFO(TRACE_MODULE_APP,"固件版本:UWB-标签 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff);
LOG_INFO(TRACE_MODULE_APP,"固件版本:UWB-免布线信标 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff);
}
void IdleTask(void)
{ UART0_CheckReceive();